Skip to content

Commit

Permalink
Change "Char" word to "client" and more explicit changelog (#1)
Browse files Browse the repository at this point in the history
* Memory OnTick link char if not, the skill will not fail.

If the memory owner is not present, skills do not fail when taking damage, but if the memory owner is alive, skills fail when taking damage.

Tested.

* The entity was jumping frames in flooded pet commands (come, guard)

* ITEMMEMORYEQUIP is not triggered in many default memories.

Previously, many memories did not have morex information, but now for some reason many memories have morex information and for this reason the trigger was not triggered in almost most of the memories, the morex query was removed. Also, the slang did not represent the memory item,

* bank hear fix (Sphereserver#1332)

If you are around an entity that you own and you are trying to open a bank next to a bank, the "bank" command is perceived as a pet command and the bank does not open. There is no problem when you type "bank" after mounting the mount, but "bank" does not work when you dismount. (Issue Sphereserver#1331)

tested.

* Added NOREJOIN tag for corpses (Sphereserver#1318)

* Added TAG.NOREJOIN tag for corpses

If the NOREJOIN tag is 1, the player cannot come back to life on that corpse. That is, the player comes back to life but not on the corpse.
	This tag does not prevent the player from coming back to life, it just prevents them from respawning on that corpse. The player always comes back to life, but not on that corpse.

* Fixed MacOS compilation error

Caused by changes in mariadb-c-connector homebrew packaging.

* RANGE is complete for skills with distance query

All skills that have a distance query have been adjusted to take the RANGE values ​​of that skill.

* Add support for delay explosion spell

* Add T_FLETCHING type to open bowcraft menu

* t_multi_addon redeed fix (Sphereserver#1314)

* New trigger @HitReactive (Sphereserver#1317)

* New trigger @HitReactive

- Added: New trigger @HitReactive Reactive Armor plays a key role in the action mechanism and is currently under very fixed rules. It has been added as a new trigger with some variables to make it a bit more flexible.
	@HitReactive
	Local.Sound (r/w) =Sound ID, If it is blank or zero, no sound is produced. (Default: 01F1)
	Local.EffectID (r/w) = Effect ID, If it is empty or zero, no effect will occur. (Default: 0374a)
	Local.Damage (r/w) = This is the more1l, or PolyStr, value coming from the reactive armor spell to i_rune_reactive_armor.
	LOCAL.RefDamage (r/w) = The amount of damage that will be reflected to this other party
	LOCAL.RedDamage (r/w) = Amount to be deducted from damage received
	LOCAL.ReactiveDamType (r/w) = Type of damage received (Default: DAMAGE_FIXED andDAMAGE_REACTIVE)
	NOTE;
		1. If no RefDamage or RedDamage values ​​are entered, the system defaults to the Reactive Armor Effect value.
		2. No damage amount can be less than 1.

* Local variable name update

* changelog update

---------

Co-authored-by: cbnolok <cbnolok@gmail.com>

* Mount Ceiling Check Fix (Sphereserver#1340)

Checked if the char is onhorse or you can't pass under some roofs even on foot (Issue Sphereserver#1329)

* Chat system crash fix (Empty Chatname)

* Added new local variable in WOPSYSTEM LOCAL.WOPTalkMode and ini settings WOPTalkMode (Sphereserver#1325)

* Added new local variable in WOPSYSTEM LOCAL.WOPTalkMode and ini settings WOPTalkMode

	In some clients, different operations can be performed in return for this, for example, if this talkmode went from sphere as TALKMODE SPELL, the operation is performed according to this incoming talk mode according to the client versions. Here, the possibility of changing the talkmode according to the client version used is given. By default, TALKMODE_SPELL
	Default talk mode: TALKMODE_SPELL = 10
	Sphere.ini;
	WOPTalkMode=0/14

	Trigger;
	@spellcast
	Local.WOPTalkMode=0/14

Tested.

* initialize the new member variable in the cserverconfig

---------

Co-authored-by: cbnolok <cbnolok@gmail.com>

* Change "Char" word to "client" and more explicit changelog

---------

Co-authored-by: Caner Kılıçoğlu <gralrummy@gmail.com>
Co-authored-by: cbnolok <cbnolok@gmail.com>
Co-authored-by: Raydie <50953519+raydienull@users.noreply.github.com>
Co-authored-by: Gladie <gladie38@gmail.com>
Co-authored-by: DavideRei <118212274+DavideRei@users.noreply.github.com>
6 people authored Dec 20, 2024
1 parent 3136816 commit 9906dd1
Showing 21 changed files with 430 additions and 156 deletions.
98 changes: 83 additions & 15 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -3915,12 +3915,83 @@ Added: 'H' shortcut for variables to get the value as hexadecimal.
13-10-2024, Jhobean
- Added: @PetRelease trigger work like @petdesert and return 1 to prevent the pet from being released.

13-10-2024, canerksk
Event definitions in Sphere.ini have been made more extensive.
27-11-2024, canerksk
- Added: All skills that have a distance query have been adjusted to take the RANGE values of that skill.
All skills to be used in RANGE;
BLACKSMITHING
MINING // It was added before.
FISHING // It was added before.
LUMBERJACKING // It was added before.
PEACEMAKING
ENTICEMENT
PROVOCATION
COOKING
TAMING
THROWING
SNOOPING
STEALING
Also added BREATH.MAXDIST to Breath. If this property is not given, the default is 14 distance.
- Added: Added NOREJOIN tag for corpses, If the NOREJOIN tag is one, the player cannot come back to life on that corpse. That is, the player comes back to life but not on the corpse.
This tag does not prevent the player from coming back to life, it just prevents them from respawning on that corpse. The player always comes back to life, but not on that corpse.
- Fixed: If you are around an entity that you own and you are trying to open a bank next to a bank, the "bank" command is perceived as a pet command and the bank does not open. There is no problem when you type "bank" after mounting the mount, but "bank" does not work when you dismount. (Issue #1331)

27-11-2024, Gladie
- Fixed: Redeeding t_multi_addon outside of housing system. Before it was only looking for owner of the multi, but in our case we need to know uid of the redeeding char.

2-12-2024, canerksk
- Fixed: Memory OnTick link char if not, the skill will not fail.
If the memory owner is not present, skills do not fail when taking damage, but if the memory owner is alive, skills fail when taking damage.
- Fixed: The entity was jumping frames in flooded pet commands (come, guard).
- Fixed: ITEMMEMORYEQUIP is not triggered in many default memories.
Previously, many memories did not have morex information, but now for some reason many memories have morex information and for this reason the trigger was not triggered in almost most of the memories, the morex query was removed. Also, the slang did not represent the memory item.

02-12-2024, raydie
- Added: Add LAYER_SPELL_Explosion for use delayed explosion spell. Now if set Duration to spell explosion, these duration is the delay to execute the explosion (From UOGuide, explosion spell: 2 second delay between targetting and explosion).

3-12-2024, canerksk
- Added: New trigger @HitReactive Reactive Armor plays a key role in the action mechanism and is currently under very fixed rules. It has been added as a new trigger with some variables to make it a bit more flexible.
@HitReactive
Local.Sound (r/w) =Sound ID, If it is blank or zero, no sound is produced. (Default: 01F1)
Local.EffectID (r/w) = Effect ID, If it is empty or zero, no effect will occur. (Default: 0374a)
Local.Damage (r/w) = This is the more1l, or PolyStr, value coming from the reactive armor spell to i_rune_reactive_armor.
LOCAL.ReflectDamage (r/w) = The amount of damage that will be reflected to this other party
LOCAL.ReduceDamage (r/w) = Amount to be deducted from damage received
LOCAL.DamageType (r/w) = Type of damage received (Default: DAMAGE_FIXED andDAMAGE_REACTIVE)
NOTE;
1. If no ReflectDamage or ReduceDamage values are entered, the system defaults to the Reactive Armor Effect value.
2. No damage amount can be less than 1.

4-12-2024, canerksk
- Fixed: Sphere crash troubleshooting if a player has no CHATNAME value and remove a channel.

6-12-2024, canerksk
- Added: Added LOCAL.WOPTalkMode in @SpellCast trigger and ini setting WOPTalkMode.
In some clients, different operations can be performed in return for this, for example, if this talkmode went from sphere as TALKMODE SPELL, the operation is performed according to this incoming talk mode according to the client versions. Here, the possibility of changing the talkmode according to the client version used is given. By default, TALKMODE_SPELL
Default talk mode: TALKMODE_SPELL = 10
Sphere.ini;
WOPTalkMode=0/14

// Events related to all NPCs (out of use)
//EventsPet=e_npc_generic_event
Trigger;
@SpellCast
Local.WOPTalkMode=0/14

TALKMODE_SAY = 0 // A character speaking.
TALKMODE_SYSTEM = 1 // Display as system prompt
TALKMODE_EMOTE = 2 // *smiles* at object (client shortcut: :+space)
TALKMODE_ITEM = 6 // text labeling an item. Preceeded by "You see"
TALKMODE_NOSCROLL = 7 // As a status msg. Does not scroll (as reported by the packet guides)
TALKMODE_WHISPER = 8 // Only those close can here. (client shortcut: ;+space)
TALKMODE_YELL = 9 // Can be heard 2 screens away. (client shortcut: !+space)
TALKMODE_SPELL = 10 // Used by spells
TALKMODE_GUILD = 13 // Used by guild chat (client shortcut: \)
TALKMODE_ALLIANCE = 14 // Used by alliance chat (client shortcut: shift+\)

13-10-2024, canerksk
[Sphere.ini]
- Removed: (Action require by admin and must update this)
EventsPet=e_npc_generic_event
EventsPlayer=e_player_generic_event
- Added: Event definitions have been made more extensive.
// Events related to all NPCs
EventsNPC=e_npc_all

@@ -3936,23 +4007,20 @@ Added: 'H' shortcut for variables to get the value as hexadecimal.
// Events related to all shopkeepers (brain_vendor, brain_stable, brain_healer)
EventsNPCShop=e_npc_shopkeepers

// Events related to all char (player and staff)
EventsChar=e_char_all
// Events related to all clients (player and staff)
EventsClient=e_client_all

// Events related to all staff (if plevel is higher than 1)
EventsClientStaff=e_client_staffs

// Events related to all players (if the plevel is lower than 1)
EventsCharPlayer=e_char_players
EventsClientPlayer=e_client_players

// Events related to all regions
//EventsRegion=er_region_all
//EventsRegion=e_region_all

// Events related to all staff (if plevel is higher than 1)
EventsCharStaff=e_char_staffs

// Events related to all players (out of use)
//EventsPlayer=

// Events related to all items
EventsItem=ei_items

// Events related to all weapons
EventsItemWeapon=ei_item_weapons
EventsItemWeapon=ei_item_weapons
2 changes: 2 additions & 0 deletions cmake/toolchains/include/OSX-AppleClang_common.inc.cmake
Original file line number Diff line number Diff line change
@@ -17,6 +17,8 @@ function(toolchain_exe_stuff_common)
HINT
"/usr/local/opt/mariadb-connector-c/lib/mariadb"
"/opt/homebrew/var/mariadb-connector-c/lib/mariadb"
"/opt/homebrew/opt/mariadb-connector-c/lib/mariadb"
"/opt/homebrew/opt/mariadb-connector-c/lib"
"/opt/homebrew/lib/mariadb"
)
message(STATUS "Library ${lib_name}: ${lib_${lib_name}_with_path}")
1 change: 1 addition & 0 deletions src/game/CObjBase.h
Original file line number Diff line number Diff line change
@@ -1088,6 +1088,7 @@ enum CTRIG_TYPE : short
CTRIG_HitIgnore, // I should ignore this target, just giving a record to scripts.
CTRIG_HitMiss, // I just missed.
CTRIG_HitParry, // I succesfully parried an hit.
CTRIG_HitReactive, // Reactive damage trigger
CTRIG_HitTry, // I am trying to hit someone. starting swing.
CTRIG_HouseDesignBegin, // Starting to customize.
CTRIG_HouseDesignCommit, // I committed a new house design
43 changes: 23 additions & 20 deletions src/game/CServerConfig.cpp
Original file line number Diff line number Diff line change
@@ -77,6 +77,7 @@ CServerConfig::CServerConfig()
m_iWordsOfPowerFont = FONT_NORMAL;
m_fWordsOfPowerPlayer = true;
m_fWordsOfPowerStaff = false;
m_iWordsOfPowerTalkMode = TALKMODE_SPELL;
m_fEquippedCast = true;
m_iMagicUnlockDoor = 900;
m_iSpellTimeout = 0;
@@ -547,9 +548,9 @@ enum RC_TYPE
RC_ERALIMITGEAR, // _iEraLimitGear
RC_ERALIMITLOOT, // _iEraLimitLoot
RC_ERALIMITPROPS, // _iEraLimitProps
RC_EVENTSCHAR, // m_sEventsChar
RC_EVENTSCHARPLAYER, // m_sEventsCharPlayer
RC_EVENTSCHARSTAFF, // m_sEventsCharStaff
RC_EVENTSCLIENT, // m_sEventsClient
RC_EVENTSCLIENTPLAYER, // m_sEventsClientPlayer
RC_EVENTSCLIENTSTAFF, // m_sEventsClientStaff
RC_EVENTSITEM, // m_sEventsItem
RC_EVENTSITEMWEAPON, // m_sEventsItemWeapon
RC_EVENTSNPC, // m_sEventsNpc
@@ -739,6 +740,7 @@ enum RC_TYPE
RC_WOPFONT,
RC_WOPPLAYER,
RC_WOPSTAFF,
RC_WOPTALKMODE,
RC_WORLDSAVE,
RC_ZEROPOINT, // m_sZeroPoint
RC_QTY
@@ -847,9 +849,9 @@ const CAssocReg CServerConfig::sm_szLoadKeys[RC_QTY + 1]
{ "ERALIMITGEAR", { ELEM_BYTE, static_cast<uint>OFFSETOF(CServerConfig,_iEraLimitGear) }},
{ "ERALIMITLOOT", { ELEM_BYTE, static_cast<uint>OFFSETOF(CServerConfig,_iEraLimitLoot) }},
{ "ERALIMITPROPS", { ELEM_BYTE, static_cast<uint>OFFSETOF(CServerConfig,_iEraLimitProps) }},
{ "EVENTSCHAR", { ELEM_CSTRING, static_cast<uint> OFFSETOF(CServerConfig, m_sEventsChar) } },
{ "EVENTSCHARPLAYER", { ELEM_CSTRING, static_cast<uint> OFFSETOF(CServerConfig, m_sEventsCharPlayer) } },
{ "EVENTSCHARSTAFF", { ELEM_CSTRING, static_cast<uint> OFFSETOF(CServerConfig, m_sEventsCharStaff) } },
{ "EVENTSCLIENT", { ELEM_CSTRING, static_cast<uint> OFFSETOF(CServerConfig, m_sEventsClient) } },
{ "EVENTSCLIENTPLAYER", { ELEM_CSTRING, static_cast<uint> OFFSETOF(CServerConfig, m_sEventsClientPlayer) } },
{ "EVENTSCLIENTSTAFF", { ELEM_CSTRING, static_cast<uint> OFFSETOF(CServerConfig, m_sEventsClientStaff) } },
{ "EVENTSITEM", { ELEM_CSTRING, static_cast<uint>OFFSETOF(CServerConfig,m_sEventsItem) }},
{ "EVENTSITEMWEAPON", { ELEM_CSTRING, static_cast<uint> OFFSETOF(CServerConfig, m_sEventsItemWeapon) } },
{ "EVENTSNPC", { ELEM_CSTRING, static_cast<uint> OFFSETOF(CServerConfig, m_sEventsNPC) } },
@@ -1039,6 +1041,7 @@ const CAssocReg CServerConfig::sm_szLoadKeys[RC_QTY + 1]
{ "WOPFONT", { ELEM_INT, static_cast<uint>OFFSETOF(CServerConfig,m_iWordsOfPowerFont) }},
{ "WOPPLAYER", { ELEM_BOOL, static_cast<uint>OFFSETOF(CServerConfig,m_fWordsOfPowerPlayer) }},
{ "WOPSTAFF", { ELEM_BOOL, static_cast<uint>OFFSETOF(CServerConfig,m_fWordsOfPowerStaff) }},
{ "WOPTALKMODE", { ELEM_INT, static_cast<uint>OFFSETOF(CServerConfig,m_iWordsOfPowerTalkMode) }},
{ "WORLDSAVE", { ELEM_CSTRING, static_cast<uint>OFFSETOF(CServerConfig,m_sWorldBaseDir) }},
{ "ZEROPOINT", { ELEM_CSTRING, static_cast<uint>OFFSETOF(CServerConfig,m_sZeroPoint) }},
{ nullptr, { ELEM_VOID, 0, }}
@@ -4891,31 +4894,31 @@ bool CServerConfig::Load( bool fResync )
}

/////////////////////
// parse eventschar
// parse eventsClient
/////////////////////

// allchars (players or staffs)
m_pEventsCharLink.clear();
if (!m_sEventsChar.IsEmpty())
// allClient (players or staffs)
m_pEventsClientLink.clear();
if (!m_sEventsClient.IsEmpty())
{
CScript script("EVENTSCHAR", m_sEventsChar);
m_pEventsCharLink.r_LoadVal(script, RES_EVENTS);
CScript script("EVENTSCLIENT", m_sEventsClient);
m_pEventsClientLink.r_LoadVal(script, RES_EVENTS);
}

// all players
m_pEventsCharPlayerLink.clear();
if (!m_sEventsCharPlayer.IsEmpty())
m_pEventsClientPlayerLink.clear();
if (!m_sEventsClientPlayer.IsEmpty())
{
CScript script("EVENTSCHARPLAYER", m_sEventsCharPlayer);
m_pEventsCharPlayerLink.r_LoadVal(script, RES_EVENTS);
CScript script("EVENTSCLIENTPLAYER", m_sEventsClientPlayer);
m_pEventsClientPlayerLink.r_LoadVal(script, RES_EVENTS);
}

// all staffs
m_pEventsCharStaffLink.clear();
if (!m_sEventsCharStaff.IsEmpty())
m_pEventsClientStaffLink.clear();
if (!m_sEventsClientStaff.IsEmpty())
{
CScript script("EVENTSCHARSTAFF", m_sEventsCharStaff);
m_pEventsCharStaffLink.r_LoadVal(script, RES_EVENTS);
CScript script("EVENTSCLIENTSTAFF", m_sEventsClientStaff);
m_pEventsClientStaffLink.r_LoadVal(script, RES_EVENTS);
}

// parse eventsregion
21 changes: 11 additions & 10 deletions src/game/CServerConfig.h
Original file line number Diff line number Diff line change
@@ -303,6 +303,7 @@ extern class CServerConfig : public CResourceHolder
int m_iWordsOfPowerFont; // Font used for Words Of Power.
bool m_fWordsOfPowerPlayer; // Words of Power for players.
bool m_fWordsOfPowerStaff; // Words of Power for staff.
TALKMODE_TYPE m_iWordsOfPowerTalkMode; // Walk mode used for Words Of Power.
bool m_fEquippedCast; // Allow casting while equipped.
bool m_fManaLossAbort; // Lose mana when spell casting aborted.
bool m_fManaLossFail; // Lose mana when spell casting failed.
@@ -458,19 +459,19 @@ extern class CServerConfig : public CResourceHolder
CResourceRefArray m_pEventsNPCShopLink; // EventsNPCShop.

//////////////////////
// Chars
// Clients
//////////////////////
// EVENTSCHAR
CSString m_sEventsChar; // Key to add Events to all players and staff.
CResourceRefArray m_pEventsCharLink; // EventsChar.
// EVENTSCLIENT
CSString m_sEventsClient; // Key to add Events to all players and staff.
CResourceRefArray m_pEventsClientLink; // EventsClient.

// EVENTSCHARSTAFF
CSString m_sEventsCharStaff; // Key to add Events to all players.
CResourceRefArray m_pEventsCharStaffLink; // EventsCharStaff.
// EVENTSCLIENTSTAFF
CSString m_sEventsClientStaff; // Key to add Events to all players.
CResourceRefArray m_pEventsClientStaffLink; // EventsClientStaff.

// EVENTSCHARPLAYER
CSString m_sEventsCharPlayer; // Key to add Events to all players.
CResourceRefArray m_pEventsCharPlayerLink; // EventsCharPlayer.
// EVENTSCLIENTPLAYER
CSString m_sEventsClientPlayer; // Key to add Events to all players.
CResourceRefArray m_pEventsClientPlayerLink; // EventsClientPlayer.

//////////////////////
// Regions
5 changes: 3 additions & 2 deletions src/game/chars/CChar.cpp
Original file line number Diff line number Diff line change
@@ -87,6 +87,7 @@ lpctstr const CChar::sm_szTrigName[CTRIG_QTY+1] = // static
"@HitIgnore", // I'm going to avoid a target (attacker.n.ignore=1) , should I un-ignore him?.
"@HitMiss", // I just missed.
"@HitParry", // I succesfully parried an hit.
"@HitReactive", // Reactive damage trigger
"@HitTry", // I am trying to hit someone. starting swing.
"@HouseDesignBegin", // Starting to customize.
"@HouseDesignCommit", // I committed a new house design.
@@ -2510,7 +2511,7 @@ bool CChar::r_WriteVal( lpctstr ptcKey, CSString & sVal, CTextConsole * pSrc, bo
}
case CHC_BREATH:
{
if( !strnicmp(ptcKey, "BREATH.DAM", 10) )
if (!strnicmp(ptcKey, "BREATH.MAXDIST", 14) || !strnicmp(ptcKey, "BREATH.DAM", 10))
{
CVarDefCont * pVar = GetDefKey(ptcKey, true);
sVal.FormatLLVal(pVar ? pVar->GetValNum() : 0);
@@ -3808,7 +3809,7 @@ bool CChar::r_LoadVal( CScript & s )
break;
case CHC_BREATH:
{
if ( !strnicmp(ptcKey, "BREATH.DAM", 10) || !strnicmp(ptcKey, "BREATH.HUE", 10) || !strnicmp(ptcKey, "BREATH.ANIM", 11) || !strnicmp(ptcKey, "BREATH.TYPE", 11) || !strnicmp(ptcKey, "BREATH.DAMTYPE", 14))
if ( !strnicmp(ptcKey, "BREATH.MAXDIST", 14) || !strnicmp(ptcKey, "BREATH.DAM", 10) || !strnicmp(ptcKey, "BREATH.HUE", 10) || !strnicmp(ptcKey, "BREATH.ANIM", 11) || !strnicmp(ptcKey, "BREATH.TYPE", 11) || !strnicmp(ptcKey, "BREATH.DAMTYPE", 14))
{
SetDefNum(s.GetKey(), s.GetArgLLVal());
return true;
37 changes: 20 additions & 17 deletions src/game/chars/CCharAct.cpp
Original file line number Diff line number Diff line change
@@ -280,11 +280,14 @@ void CChar::LayerAdd( CItem * pItem, LAYER_TYPE layer )
return;
}

if (!pItem->IsTypeSpellable() && !pItem->m_itSpell.m_spell && !pItem->IsType(IT_WAND)) // can this item have a spell effect ? If so we do not send
{
//if (!pItem->IsTypeSpellable() && !pItem->m_itSpell.m_spell && !pItem->IsType(IT_WAND)) // can this item have a spell effect ? If so we do not send
// Since most of the memories came with a morex information by default, almost no memory was triggered.
if (!(pItem->IsTypeSpellable() || pItem->IsType(IT_WAND)))
{
if ((IsTrigUsed(TRIGGER_MEMORYEQUIP)) || (IsTrigUsed(TRIGGER_ITEMMEMORYEQUIP)))
{
CScriptTriggerArgs pArgs;
//CScriptTriggerArgs pArgs;
CScriptTriggerArgs pArgs(pItem); // added "argo" argument
pArgs.m_iN1 = layer;
if (pItem->OnTrigger(ITRIG_MemoryEquip, this, &pArgs) == TRIGRET_RET_TRUE)
{
@@ -5721,11 +5724,11 @@ TRIGRET_TYPE CChar::OnTrigger( lpctstr pszTrigName, CTextConsole * pSrc, CScript
// Chars
if (m_pPlayer != nullptr)
{
// 10) EVENTSCHAR triggers for chars (players or staffs)
EXC_SET_BLOCK("chardef triggers - EVENTSCHAR");
for (size_t i = 0; i < g_Cfg.m_pEventsCharLink.size(); ++i)
// 10) EVENTSCLIENT triggers for chars (players or staffs)
EXC_SET_BLOCK("chardef triggers - EVENTSCLIENT");
for (size_t i = 0; i < g_Cfg.m_pEventsClientLink.size(); ++i)
{
CResourceLink *pLink = g_Cfg.m_pEventsCharLink[i].GetRef();
CResourceLink *pLink = g_Cfg.m_pEventsClientLink[i].GetRef();
if (!pLink || !pLink->HasTrigger(iAction) || (executedEvents.find(pLink) != executedEvents.end()))
continue;

@@ -5739,14 +5742,14 @@ TRIGRET_TYPE CChar::OnTrigger( lpctstr pszTrigName, CTextConsole * pSrc, CScript
goto stopandret;
}

// 11) EVENTSCHARPLAYER triggers for playerss
// 11) EVENTSCLIENTPLAYER triggers for playerss
if (GetPrivLevel() <= PLEVEL_Player)
{
// EVENTSCHARPLAYER triggers (constant events of players set from sphere.ini)
EXC_SET_BLOCK("chardef triggers - EVENTSCHARPLAYER");
for (size_t i = 0; i < g_Cfg.m_pEventsCharPlayerLink.size(); ++i)
// EVENTSCLIENTPLAYER triggers (constant events of players set from sphere.ini)
EXC_SET_BLOCK("chardef triggers - EVENTSCLIENTPLAYER");
for (size_t i = 0; i < g_Cfg.m_pEventsClientPlayerLink.size(); ++i)
{
CResourceLink *pLink = g_Cfg.m_pEventsCharPlayerLink[i].GetRef();
CResourceLink *pLink = g_Cfg.m_pEventsClientPlayerLink[i].GetRef();
if (!pLink || !pLink->HasTrigger(iAction) || (executedEvents.find(pLink) != executedEvents.end()))
continue;

@@ -5761,14 +5764,14 @@ TRIGRET_TYPE CChar::OnTrigger( lpctstr pszTrigName, CTextConsole * pSrc, CScript
}
}

// 12) EVENTSCHARSTAFF triggers for staffs
// 12) EVENTSCLIENTSTAFF triggers for staffs
if (GetPrivLevel() >= PLEVEL_Counsel)
{
// EVENTSCHARSTAFF triggers (constant events of players set from sphere.ini)
EXC_SET_BLOCK("chardef triggers - EVENTSCHARSTAFF");
for (size_t i = 0; i < g_Cfg.m_pEventsCharStaffLink.size(); ++i)
// EVENTSCLIENTSTAFF triggers (constant events of players set from sphere.ini)
EXC_SET_BLOCK("chardef triggers - EVENTSCLIENTSTAFF");
for (size_t i = 0; i < g_Cfg.m_pEventsClientStaffLink.size(); ++i)
{
CResourceLink *pLink = g_Cfg.m_pEventsCharStaffLink[i].GetRef();
CResourceLink *pLink = g_Cfg.m_pEventsClientStaffLink[i].GetRef();
if (!pLink || !pLink->HasTrigger(iAction) || (executedEvents.find(pLink) != executedEvents.end()))
continue;

Loading

0 comments on commit 9906dd1

Please sign in to comment.