mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 11:25:42 +00:00
feat(Core/Hooks): added collection of hooks to extends AC (#3047)
This collection of hooks comes from the Maelstrom project. It allows to release modules such as : - 3v3-soloqueue - 1v1 arena - pvestats and many others
This commit is contained in:
@@ -91,7 +91,11 @@ void AddItemsSetItem(Player* player, Item* item)
|
||||
}
|
||||
|
||||
// spell casted only if fit form requirement, in other case will casted at form change
|
||||
player->ApplyEquipSpell(spellInfo, nullptr, true);
|
||||
if (sScriptMgr->CanItemApplyEquipSpell(player, item))
|
||||
{
|
||||
player->ApplyEquipSpell(spellInfo, nullptr, true);
|
||||
}
|
||||
|
||||
eff->spells[y] = spellInfo;
|
||||
break;
|
||||
}
|
||||
@@ -266,6 +270,7 @@ bool Item::Create(uint32 guidlow, uint32 itemid, Player const* owner)
|
||||
|
||||
SetUInt32Value(ITEM_FIELD_DURATION, itemProto->Duration);
|
||||
SetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME, 0);
|
||||
sScriptMgr->OnItemCreate(this, itemProto, owner);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -423,7 +428,7 @@ bool Item::LoadFromDB(uint32 guid, uint64 owner_guid, Field* fields, uint32 entr
|
||||
|
||||
SetUInt32Value(ITEM_FIELD_FLAGS, fields[5].GetUInt32());
|
||||
// Remove bind flag for items vs NO_BIND set
|
||||
if (IsSoulBound() && proto->Bonding == NO_BIND)
|
||||
if (IsSoulBound() && proto->Bonding == NO_BIND && sScriptMgr->CanApplySoulboundFlag(this, proto))
|
||||
{
|
||||
ApplyModFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_SOULBOUND, false);
|
||||
need_save = true;
|
||||
|
||||
Reference in New Issue
Block a user