mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 08:17:56 +00:00
Merge branch '1.x'
This commit is contained in:
@@ -12820,6 +12820,8 @@ void Player::MoveItemFromInventory(uint8 bag, uint8 slot, bool update)
|
|||||||
it->RemoveFromWorld();
|
it->RemoveFromWorld();
|
||||||
it->DestroyForPlayer(this);
|
it->DestroyForPlayer(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sScriptMgr->OnAfterPlayerMoveItemFromInventory(this,it,bag,slot,update);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1328,6 +1328,11 @@ void ScriptMgr::OnAfterPlayerSetVisibleItemSlot(Player* player, uint8 slot, Item
|
|||||||
FOREACH_SCRIPT(PlayerScript)->OnAfterSetVisibleItemSlot(player, slot,item);
|
FOREACH_SCRIPT(PlayerScript)->OnAfterSetVisibleItemSlot(player, slot,item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScriptMgr::OnAfterPlayerMoveItemFromInventory(Player* player, Item* it, uint8 bag, uint8 slot, bool update)
|
||||||
|
{
|
||||||
|
FOREACH_SCRIPT(PlayerScript)->OnAfterMoveItemFromInventory(player, it, bag, slot, update);
|
||||||
|
}
|
||||||
|
|
||||||
// Guild
|
// Guild
|
||||||
void ScriptMgr::OnGuildAddMember(Guild* guild, Player* player, uint8& plRank)
|
void ScriptMgr::OnGuildAddMember(Guild* guild, Player* player, uint8& plRank)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -788,6 +788,9 @@ class PlayerScript : public ScriptObject
|
|||||||
|
|
||||||
// To change behaviour of set visible item slot
|
// To change behaviour of set visible item slot
|
||||||
virtual void OnAfterSetVisibleItemSlot(Player* /*player*/, uint8 /*slot*/, Item* /*item*/) { }
|
virtual void OnAfterSetVisibleItemSlot(Player* /*player*/, uint8 /*slot*/, Item* /*item*/) { }
|
||||||
|
|
||||||
|
// After an item has been moved from inventory
|
||||||
|
virtual void OnAfterMoveItemFromInventory(Player* /*player*/, Item* /*it*/,uint8 /*bag*/, uint8 /*slot*/, bool /*update*/) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class GuildScript : public ScriptObject
|
class GuildScript : public ScriptObject
|
||||||
@@ -1084,7 +1087,8 @@ class ScriptMgr
|
|||||||
void OnGossipSelect(Player* player, uint32 menu_id, uint32 sender, uint32 action);
|
void OnGossipSelect(Player* player, uint32 menu_id, uint32 sender, uint32 action);
|
||||||
void OnGossipSelectCode(Player* player, uint32 menu_id, uint32 sender, uint32 action, const char* code);
|
void OnGossipSelectCode(Player* player, uint32 menu_id, uint32 sender, uint32 action, const char* code);
|
||||||
void OnPlayerBeingCharmed(Player* player, Unit* charmer, uint32 oldFactionId, uint32 newFactionId);
|
void OnPlayerBeingCharmed(Player* player, Unit* charmer, uint32 oldFactionId, uint32 newFactionId);
|
||||||
void OnAfterPlayerSetVisibleItemSlot(Player* player, uint8 /*slot*/, Item *item);
|
void OnAfterPlayerSetVisibleItemSlot(Player* player, uint8 slot, Item *item);
|
||||||
|
void OnAfterPlayerMoveItemFromInventory(Player* player, Item* it, uint8 bag, uint8 slot, bool update);
|
||||||
|
|
||||||
public: /* GuildScript */
|
public: /* GuildScript */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user