Updated lua consts

This commit is contained in:
Sam 2013-10-20 17:15:24 +02:00
parent 67bd00556d
commit 241b54262a
4 changed files with 21 additions and 11 deletions

View File

@ -81,6 +81,16 @@ GameNewSpeedLaw = 36
GameForceFirstAutoWalkStep = 37 GameForceFirstAutoWalkStep = 37
GameMinimapRemove = 38 GameMinimapRemove = 38
GameDoubleShopSellAmount = 39 GameDoubleShopSellAmount = 39
GameContainerPagination = 40
GameThingMarks = 41
GameLooktypeU16 = 42
GamePlayerStamina = 43
GamePlayerAddons = 44
GameMessageStatements = 45
GameMesssageLevel = 46
GameNewFluids = 47
GamePlayerStateU16 = 48
GameNewOutfitProtocol = 49
TextColors = { TextColors = {
red = '#f55e5e', --'#c83200' red = '#f55e5e', --'#c83200'

View File

@ -355,14 +355,14 @@ namespace Otc
GameDoubleShopSellAmount = 39, GameDoubleShopSellAmount = 39,
GameContainerPagination = 40, GameContainerPagination = 40,
GameThingMarks = 41, GameThingMarks = 41,
GameLooktypeU16 = 42, GameLooktypeU16 = 42,
GamePlayerStamina = 43, GamePlayerStamina = 43,
GamePlayerAddons = 44, GamePlayerAddons = 44,
GameMessageStatments = 45, GameMessageStatements = 45,
GameMessageLevel = 46, GameMessageLevel = 46,
GameNewFluids = 47, GameNewFluids = 47,
GamePlayerStateU16 = 48, GamePlayerStateU16 = 48,
GameNewOutfitProtocol = 49,
// 51-100 reserved to be defined in lua // 51-100 reserved to be defined in lua
LastGameFeature = 101 LastGameFeature = 101

View File

@ -1427,9 +1427,10 @@ void Game::setProtocolVersion(int version)
enableFeature(Otc::GamePlayerStamina); enableFeature(Otc::GamePlayerStamina);
enableFeature(Otc::GameNewFluids); enableFeature(Otc::GameNewFluids);
enableFeature(Otc::GameMessageLevel); enableFeature(Otc::GameMessageLevel);
enableFeature(Otc::GameMessageStatments); enableFeature(Otc::GameMessageStatements);
enableFeature(Otc::GamePlayerStateU16); enableFeature(Otc::GamePlayerStateU16);
enableFeature(Otc::GameLooktypeU16); enableFeature(Otc::GameLooktypeU16);
enableFeature(Otc::GameNewOutfitProtocol);
} }
if(version >= 840) { if(version >= 840) {

View File

@ -1140,7 +1140,7 @@ void ProtocolGame::parseMultiUseCooldown(const InputMessagePtr& msg)
void ProtocolGame::parseTalk(const InputMessagePtr& msg) void ProtocolGame::parseTalk(const InputMessagePtr& msg)
{ {
if(g_game.getFeature(Otc::GameMessageStatments)) if(g_game.getFeature(Otc::GameMessageStatements))
msg->getU32(); // channel statement guid msg->getU32(); // channel statement guid
std::string name = g_game.formatCreatureName(msg->getString()); std::string name = g_game.formatCreatureName(msg->getString());
@ -1397,13 +1397,7 @@ void ProtocolGame::parseOpenOutfitWindow(const InputMessagePtr& msg)
Outfit currentOutfit = getOutfit(msg); Outfit currentOutfit = getOutfit(msg);
std::vector<std::tuple<int, std::string, int> > outfitList; std::vector<std::tuple<int, std::string, int> > outfitList;
if(g_game.getProtocolVersion() < 780) { if(g_game.getFeature(Otc::GameNewOutfitProtocol)) {
int outfitStart = msg->getU8();
int outfitEnd = msg->getU8();
for(int i = outfitStart; i <= outfitEnd; i++)
outfitList.push_back(std::make_tuple(i, "", 0));
}
else {
int outfitCount = msg->getU8(); int outfitCount = msg->getU8();
for(int i = 0; i < outfitCount; i++) { for(int i = 0; i < outfitCount; i++) {
int outfitId = msg->getU16(); int outfitId = msg->getU16();
@ -1412,6 +1406,11 @@ void ProtocolGame::parseOpenOutfitWindow(const InputMessagePtr& msg)
outfitList.push_back(std::make_tuple(outfitId, outfitName, outfitAddons)); outfitList.push_back(std::make_tuple(outfitId, outfitName, outfitAddons));
} }
} else {
int outfitStart = msg->getU8();
int outfitEnd = msg->getU8();
for(int i = outfitStart; i <= outfitEnd; i++)
outfitList.push_back(std::make_tuple(i, "", 0));
} }
std::vector<std::tuple<int, std::string> > mountList; std::vector<std::tuple<int, std::string> > mountList;