Added missing premium trigger opcode.

This commit is contained in:
BenDol 2014-08-07 07:17:16 +12:00
parent ef7f94ac76
commit d3d3294277
3 changed files with 20 additions and 4 deletions

View File

@ -107,6 +107,7 @@ namespace Proto {
GameServerCreatureType = 149,
GameServerEditText = 150,
GameServerEditList = 151,
GameServerPremiumTrigger = 158, // 1038
GameServerPlayerDataBasic = 159, // 950
GameServerPlayerData = 160,
GameServerPlayerSkills = 161,

View File

@ -178,6 +178,7 @@ private:
void parseCreatureUnpass(const InputMessagePtr& msg);
void parseEditText(const InputMessagePtr& msg);
void parseEditList(const InputMessagePtr& msg);
void parsePremiumTrigger(const InputMessagePtr& msg);
void parsePlayerInfo(const InputMessagePtr& msg);
void parsePlayerStats(const InputMessagePtr& msg);
void parsePlayerSkills(const InputMessagePtr& msg);

View File

@ -207,6 +207,10 @@ void ProtocolGame::parseMessage(const InputMessagePtr& msg)
case Proto::GameServerEditList:
parseEditList(msg);
break;
// PROTOCOL>=1038
case Proto::GameServerPremiumTrigger:
parsePremiumTrigger(msg);
break;
case Proto::GameServerPlayerData:
parsePlayerStats(msg);
break;
@ -1019,6 +1023,16 @@ void ProtocolGame::parseEditList(const InputMessagePtr& msg)
g_game.processEditList(id, doorId, text);
}
void ProtocolGame::parsePremiumTrigger(const InputMessagePtr& msg)
{
int triggerCount = msg->getU8();
std::vector<int> triggers;
for(int i=0;i<triggerCount;++i) {
triggers.push_back(msg->getU8());
}
bool something = msg->getU8() == 1;
}
void ProtocolGame::parsePlayerInfo(const InputMessagePtr& msg)
{
bool premium = msg->getU8(); // premium
@ -2036,11 +2050,11 @@ ItemPtr ProtocolGame::getItem(const InputMessagePtr& msg, int id)
if(g_game.getFeature(Otc::GameItemAnimationPhase)) {
if(item->getAnimationPhases() > 1) {
// 0xfe => random phase
// 0xff => async?
// 0x00 => automatic phase
// 0xFE => random phase
// 0xFF => async phase
msg->getU8();
// Remove async since OTB file in server is configured so every item with animationPhase > 1 is a random phase item.
//item->setAsync(msg->getU8() == 0xff);
//item->setPhase(msg->getU8());
}
}