mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Spell: make a distinction between triggered flags with debugging purposes, and don't use them when casting triggered spells
This commit is contained in:
@@ -450,13 +450,19 @@ enum TriggerCastFlags
|
||||
TRIGGERED_IGNORE_SET_FACING = 0x00000200, //! Will not adjust facing to target (if any)
|
||||
TRIGGERED_IGNORE_SHAPESHIFT = 0x00000400, //! Will ignore shapeshift checks
|
||||
TRIGGERED_IGNORE_CASTER_AURASTATE = 0x00000800, //! Will ignore caster aura states including combat requirements and death state
|
||||
// reuse = 0x00001000,
|
||||
TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE = 0x00002000, //! Will ignore mounted/on vehicle restrictions
|
||||
// reuse = 0x00004000,
|
||||
// reuse = 0x00008000,
|
||||
TRIGGERED_IGNORE_CASTER_AURAS = 0x00010000, //! Will ignore caster aura restrictions or requirements
|
||||
TRIGGERED_DONT_RESET_PERIODIC_TIMER = 0x00020000, //! Will allow periodic aura timers to keep ticking (instead of resetting)
|
||||
TRIGGERED_DONT_REPORT_CAST_ERROR = 0x00040000, //! Will return SPELL_FAILED_DONT_REPORT in CheckCast functions
|
||||
TRIGGERED_FULL_MASK = 0x0007FFFF, //! Used when doing CastSpell with triggered == true
|
||||
|
||||
// debug flags (used with .cast triggered commands)
|
||||
TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT = 0x00080000, //! Will ignore equipped item requirements
|
||||
TRIGGERED_IGNORE_TARGET_CHECK = 0x00100000, //! Will ignore most target checks (mostly DBC target checks)
|
||||
TRIGGERED_FULL_MASK = 0xFFFFFFFF
|
||||
TRIGGERED_FULL_DEBUG_MASK = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
enum UnitMods
|
||||
|
||||
@@ -99,8 +99,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool triggered = (triggeredStr != NULL);
|
||||
|
||||
TriggerCastFlags triggered = (triggeredStr != NULL) ? TRIGGERED_FULL_DEBUG_MASK : TRIGGERED_NONE;
|
||||
handler->GetSession()->GetPlayer()->CastSpell(target, spellId, triggered);
|
||||
|
||||
return true;
|
||||
@@ -132,8 +131,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool triggered = (triggeredStr != NULL);
|
||||
|
||||
TriggerCastFlags triggered = (triggeredStr != NULL) ? TRIGGERED_FULL_DEBUG_MASK : TRIGGERED_NONE;
|
||||
caster->CastSpell(handler->GetSession()->GetPlayer(), spellId, triggered);
|
||||
|
||||
return true;
|
||||
@@ -167,8 +165,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool triggered = (triggeredStr != NULL);
|
||||
|
||||
TriggerCastFlags triggered = (triggeredStr != NULL) ? TRIGGERED_FULL_DEBUG_MASK : TRIGGERED_NONE;
|
||||
float x, y, z;
|
||||
handler->GetSession()->GetPlayer()->GetClosePoint(x, y, z, dist);
|
||||
|
||||
@@ -230,8 +227,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool triggered = (triggeredStr != NULL);
|
||||
|
||||
TriggerCastFlags triggered = (triggeredStr != NULL) ? TRIGGERED_FULL_DEBUG_MASK : TRIGGERED_NONE;
|
||||
caster->CastSpell(caster->GetVictim(), spellId, triggered);
|
||||
|
||||
return true;
|
||||
@@ -274,8 +270,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool triggered = (triggeredStr != NULL);
|
||||
|
||||
TriggerCastFlags triggered = (triggeredStr != NULL) ? TRIGGERED_FULL_DEBUG_MASK : TRIGGERED_NONE;
|
||||
caster->CastSpell(x, y, z, spellId, triggered);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user