[Quest API] (Performance) Check event exists before export and execute EVENT_GROUP_CHANGE (#2884)

* [Quest API] Optionally parse EVENT_GROUP_CHANGE

# Notes
- Optionally parse this event instead of always doing so.

* Update embparser.cpp
This commit is contained in:
Alex King 2023-02-12 22:56:25 -05:00 committed by GitHub
parent f9a87e26c9
commit 0e51131d67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 11 deletions

View File

@ -1746,7 +1746,6 @@ void PerlembParser::ExportEventVariables(
break;
}
case EVENT_SPELL_EFFECT_BUFF_TIC_BOT:
case EVENT_SPELL_EFFECT_BUFF_TIC_CLIENT:
case EVENT_SPELL_EFFECT_BUFF_TIC_NPC:

View File

@ -5355,34 +5355,37 @@ int16 Mob::GetCritDmgMod(uint16 skill, Mob* owner)
void Mob::SetGrouped(bool v)
{
if(v)
{
if (v) {
israidgrouped = false;
}
isgrouped = v;
if(IsClient())
{
if (IsClient()) {
if (parse->PlayerHasQuestSub(EVENT_GROUP_CHANGE)) {
parse->EventPlayer(EVENT_GROUP_CHANGE, CastToClient(), "", 0);
}
if(!v)
if (!v) {
CastToClient()->RemoveGroupXTargets();
}
}
}
void Mob::SetRaidGrouped(bool v)
{
if(v)
{
if (v) {
isgrouped = false;
}
israidgrouped = v;
if(IsClient())
{
if (IsClient()) {
if (parse->PlayerHasQuestSub(EVENT_GROUP_CHANGE)) {
parse->EventPlayer(EVENT_GROUP_CHANGE, CastToClient(), "", 0);
}
}
}
int Mob::GetCriticalChanceBonus(uint16 skill)
{