Compare commits

..

2 Commits

Author SHA1 Message Date
Yehonal d591c1169e Update AuthSocket.h 2016-11-19 00:28:32 +01:00
Yehonal 7e56f3f1fc Implemented hook for Player::MoveItemFromInventory 2016-11-19 00:18:44 +01:00
4 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ enum eStatus
STATUS_CHALLENGE,
STATUS_LOGON_PROOF,
STATUS_RECON_PROOF,
STATUS_PATCH, // unused in CMaNGOS
STATUS_PATCH, // unused
STATUS_AUTHED,
STATUS_CLOSED
};
+2
View File
@@ -12820,6 +12820,8 @@ void Player::MoveItemFromInventory(uint8 bag, uint8 slot, bool update)
it->RemoveFromWorld();
it->DestroyForPlayer(this);
}
sScriptMgr->OnAfterPlayerMoveItemFromInventory(this,it,bag,slot,update);
}
}
+5
View File
@@ -1328,6 +1328,11 @@ void ScriptMgr::OnAfterPlayerSetVisibleItemSlot(Player* player, uint8 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
void ScriptMgr::OnGuildAddMember(Guild* guild, Player* player, uint8& plRank)
{
+5 -1
View File
@@ -788,6 +788,9 @@ class PlayerScript : public ScriptObject
// To change behaviour of set visible item slot
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
@@ -1084,7 +1087,8 @@ class ScriptMgr
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 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 */