mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
New hooks OnAfterUpdateMaxPower and OnBeforeRollMeleeOutcomeAgainst
This commit is contained in:
@@ -444,6 +444,8 @@ public:
|
||||
|
||||
//Called when Damage is Dealt
|
||||
virtual uint32 DealDamage(Unit* AttackerUnit, Unit *pVictim, uint32 damage, DamageEffectType damagetype) { return damage; }
|
||||
|
||||
virtual void OnBeforeRollMeleeOutcomeAgainst(const Unit* /*attacker*/, const Unit* /*victim*/, WeaponAttackType /*attType*/, int32& /*crit_chance*/, int32& /*miss_chance*/ , int32& /*dodge_chance*/ , int32& /*parry_chance*/ , int32& /*block_chance*/ ) { };
|
||||
};
|
||||
|
||||
class MovementHandlerScript : public ScriptObject
|
||||
@@ -883,8 +885,12 @@ class PlayerScript : public ScriptObject
|
||||
virtual void OnQuestRewardItem(Player* player, Item* item, uint32 count) { }
|
||||
|
||||
//Before buying something from any vendor
|
||||
virtual void OnBeforeBuyItemFromVendor(Player* player, uint64 vendorguid, uint32 vendorslot, uint32 &item, uint8 count, uint8 bag, uint8 slot) { };
|
||||
virtual void OnBeforeBuyItemFromVendor(Player* /*player*/, uint64 /*vendorguid*/, uint32 /*vendorslot*/, uint32 &/*item*/, uint8 /*count*/, uint8 /*bag*/, uint8 /*slot*/) { };
|
||||
|
||||
//Before buying something from any vendor
|
||||
virtual void OnAfterStoreOrEquipNewItem(Player* /*player*/, uint32 /*vendorslot*/, uint32& /*item*/, uint8 /*count*/, uint8 /*bag*/, uint8 /*slot*/, ItemTemplate const* /*pProto*/, Creature* /*pVendor*/, VendorItem const* /*crItem*/, bool /*bStore*/) { };
|
||||
|
||||
virtual void OnAfterUpdateMaxPower(Player* /*player*/, Powers& /*power*/, float& /*value*/) { }
|
||||
};
|
||||
|
||||
class GuildScript : public ScriptObject
|
||||
@@ -1195,6 +1201,8 @@ class ScriptMgr
|
||||
void OnCreateItem(Player* player, Item* item, uint32 count);
|
||||
void OnQuestRewardItem(Player* player, Item* item, uint32 count);
|
||||
void OnBeforeBuyItemFromVendor(Player * player, uint64 vendorguid, uint32 vendorslot, uint32 &item, uint8 count, uint8 bag, uint8 slot);
|
||||
void OnAfterStoreOrEquipNewItem(Player* player, uint32 vendorslot, uint32 &item, uint8 count, uint8 bag, uint8 slot, ItemTemplate const* pProto, Creature* pVendor, VendorItem const* crItem, bool bStore);
|
||||
void OnAfterUpdateMaxPower(Player* player, Powers& power, float& value);
|
||||
|
||||
public: /* GuildScript */
|
||||
|
||||
@@ -1242,6 +1250,8 @@ class ScriptMgr
|
||||
void ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage);
|
||||
void ModifyHealRecieved(Unit* target, Unit* attacker, uint32& addHealth);
|
||||
uint32 DealDamage(Unit* AttackerUnit, Unit *pVictim, uint32 damage, DamageEffectType damagetype);
|
||||
void OnBeforeRollMeleeOutcomeAgainst(const Unit* attacker, const Unit* victim, WeaponAttackType attType, int32 &crit_chance, int32 &miss_chance, int32 &dodge_chance, int32 &parry_chance, int32 &block_chance);
|
||||
|
||||
|
||||
public: /* MovementHandlerScript */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user