mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 00:19:59 +01:00
Core/Script: add script hook to allow overriding of a vehicle passenger's exit position (#23322)
* Core/Script: add script hook to allow overriding of a vehicle passenger's exit position. * Allow to change orientation, and fix nopch. * Keep original orientation, thanks jackpoz! * Update Unit.cpp Code cleanup * Update Unit.cpp
This commit is contained in:
@@ -69,6 +69,7 @@ struct CreatureTemplate;
|
||||
struct CreatureData;
|
||||
struct ItemTemplate;
|
||||
struct MapEntry;
|
||||
struct Position;
|
||||
|
||||
enum BattlegroundTypeId : uint32;
|
||||
enum ContentLevels : uint8;
|
||||
@@ -407,6 +408,9 @@ class TC_GAME_API UnitScript : public ScriptObject
|
||||
|
||||
// Called when Spell Damage is being Dealt
|
||||
virtual void ModifySpellDamageTaken(Unit* /*target*/, Unit* /*attacker*/, int32& /*damage*/) { }
|
||||
|
||||
// Called when an unit exits a vehicle
|
||||
virtual void ModifyVehiclePassengerExitPos(Unit* /*passenger*/, Vehicle* /*vehicle*/, Position& /*pos*/) { }
|
||||
};
|
||||
|
||||
class TC_GAME_API CreatureScript : public UnitScript
|
||||
@@ -1053,6 +1057,7 @@ class TC_GAME_API ScriptMgr
|
||||
void ModifyPeriodicDamageAurasTick(Unit* target, Unit* attacker, uint32& damage);
|
||||
void ModifyMeleeDamage(Unit* target, Unit* attacker, uint32& damage);
|
||||
void ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage);
|
||||
void ModifyVehiclePassengerExitPos(Unit* passenger, Vehicle* vehicle, Position& pos);
|
||||
|
||||
private:
|
||||
uint32 _scriptCount;
|
||||
|
||||
Reference in New Issue
Block a user