Add OnPlayerChangeInventory server script callback

This commit is contained in:
David Cernat 2016-11-03 16:39:31 +02:00
parent 6ff47bbde9
commit 107dacac6d
3 changed files with 5 additions and 1 deletions

View file

@ -225,6 +225,9 @@ void Networking::ProcessPlayerPacket(RakNet::Packet *packet)
{
DEBUG_PRINTF("ID_GAME_INVENTORY\n");
myPacket->Read(player);
Script::Call<Script::CallbackIdentity("OnPlayerChangeInventory")>(player->GetID());
break;
}

View file

@ -105,6 +105,7 @@ public:
{"OnPlayerChangeSkills", Function<void, unsigned short>()},
{"OnPlayerChangeLevel", Function<void, unsigned short>()},
{"OnPlayerChangeEquipment", Function<void, unsigned short>()},
{"OnPlayerChangeInventory", Function<void, unsigned short>()},
{"OnPlayerSendMessage", Function<bool, unsigned short, const char*>()},
{"OnPlayerEndCharGen", Function<void, unsigned short>()},
{"OnGUIAction", Function<void, unsigned short, int, const char*>()}

View file

@ -59,11 +59,11 @@ void LocalPlayer::Update()
updateAttackState();
updateDeadState();
updateEquipped();
updateInventory();
updateDynamicStats();
updateAttributes();
updateSkills();
updateLevel();
updateInventory();
}
void LocalPlayer::charGen(int stageFirst, int stageEnd)