mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-03 09:12:26 +00:00
Allow to set/del qglobals in encounters scripts
This commit is contained in:
parent
481492cb59
commit
b417e23d97
@ -1292,7 +1292,7 @@ void QuestManager::setglobal(const char *varname, const char *newvalue, int opti
|
|||||||
QuestManagerCurrentQuestVars();
|
QuestManagerCurrentQuestVars();
|
||||||
int qgZoneid = zone->GetZoneID();
|
int qgZoneid = zone->GetZoneID();
|
||||||
int qgCharid = 0;
|
int qgCharid = 0;
|
||||||
int qgNpcid = owner->GetNPCTypeID();
|
int qgNpcid = owner ? owner->GetNPCTypeID() : 0; // encounter scripts don't have an owner
|
||||||
|
|
||||||
/* options value determines the availability of global variables to NPCs when a quest begins
|
/* options value determines the availability of global variables to NPCs when a quest begins
|
||||||
------------------------------------------------------------------
|
------------------------------------------------------------------
|
||||||
@ -1412,7 +1412,7 @@ void QuestManager::delglobal(const char *varname) {
|
|||||||
QuestManagerCurrentQuestVars();
|
QuestManagerCurrentQuestVars();
|
||||||
int qgZoneid = zone->GetZoneID();
|
int qgZoneid = zone->GetZoneID();
|
||||||
int qgCharid = 0;
|
int qgCharid = 0;
|
||||||
int qgNpcid=owner->GetNPCTypeID();
|
int qgNpcid = owner ? owner->GetNPCTypeID() : 0; // encounter scripts don't have an owner
|
||||||
|
|
||||||
if (initiator && initiator->IsClient()) // some events like waypoint and spawn don't have a player involved
|
if (initiator && initiator->IsClient()) // some events like waypoint and spawn don't have a player involved
|
||||||
qgCharid=initiator->CharacterID();
|
qgCharid=initiator->CharacterID();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user