This commit is contained in:
Henrique
2011-09-02 01:29:00 -03:00
parent 6737b0a492
commit 3928db1c4d
4 changed files with 67 additions and 5 deletions

View File

@@ -801,19 +801,31 @@ void ProtocolGame::parseOutfitWindow(InputMessage& msg)
void ProtocolGame::parseVipState(InputMessage& msg)
{
msg.getU32(); // player id
msg.getString(); // player name
msg.getU8(); // online
uint32 id = msg.getU32();
std::string name = msg.getString();
bool online = msg.getU8() != 0;
g_dispatcher.addEvent([=] {
g_lua.callGlobalField("Game", "onAddVip", id, name, online);
});
}
void ProtocolGame::parseVipLogin(InputMessage& msg)
{
msg.getU32(); // player id
uint32 id = msg.getU32();
g_dispatcher.addEvent([=] {
g_lua.callGlobalField("Game", "onVipStateChange", id, true);
});
}
void ProtocolGame::parseVipLogout(InputMessage& msg)
{
msg.getU32(); // player id
uint32 id = msg.getU32();
g_dispatcher.addEvent([=] {
g_lua.callGlobalField("Game", "onVipStateChange", id, false);
});
}
void ProtocolGame::parseShowTutorial(InputMessage& msg)