vip improvements

This commit is contained in:
Henrique 2011-09-02 19:52:40 -03:00
parent 3928db1c4d
commit bdbfa5b6ac
4 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,7 @@
VipListLabel < Label
font: tibia-10px-monochrome
margin.left: 30
Window Window
id: vipWindow id: vipWindow
title: VIP title: VIP

View File

@ -11,6 +11,7 @@ function Game.onAddVip(id, name, online)
vipList:addChild(label) vipList:addChild(label)
label:setId('vip' .. id) label:setId('vip' .. id)
label:setText(name) label:setText(name)
label:setStyle('VipListLabel')
if online then if online then
label:setForegroundColor('#00ff00') label:setForegroundColor('#00ff00')

View File

@ -54,6 +54,8 @@ public:
void sendTurnEast(); void sendTurnEast();
void sendTurnSouth(); void sendTurnSouth();
void sendTurnWest(); void sendTurnWest();
void sendAddVip(const std::string& name);
void sendRemoveVip(int id);
private: private:
void sendLoginPacket(uint32 timestamp, uint8 unknown); void sendLoginPacket(uint32 timestamp, uint8 unknown);

View File

@ -157,3 +157,19 @@ void ProtocolGame::sendTurnWest()
oMsg.addU8(Otc::ClientRotateWest); oMsg.addU8(Otc::ClientRotateWest);
send(oMsg); send(oMsg);
} }
void ProtocolGame::sendAddVip(const std::string& name)
{
OutputMessage oMsg;
oMsg.addU8(Otc::ClientAddBuddy);
oMsg.addString(name);
send(oMsg);
}
void ProtocolGame::sendRemoveVip(int id)
{
OutputMessage oMsg;
oMsg.addU8(Otc::ClientRemoveBuddy);
oMsg.addU32(id);
send(oMsg);
}