mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
Added Market/MarketProtocol module to begin the construction of the Market! Fixed some Minor Issues, and Some Cosmetics
* Added new protocol lib. * Added missing Game Features to game/const.lua * Added new Market module that will handle the market/market protocols too. * Finished Market protocol and begun on the market structure (MarketOffer etc). * Removed any traces of market protocol in the core (I think). * Moved minimap images to /images. * Removed old zoom images for minimap. * Fixed a bug with randomize outfit.
This commit is contained in:
@@ -32,7 +32,7 @@ class InputMessage : public LuaObject
|
||||
public:
|
||||
enum {
|
||||
BUFFER_MAXSIZE = 16384,
|
||||
MAX_HEADER_SIZE = 8,
|
||||
MAX_HEADER_SIZE = 8
|
||||
};
|
||||
|
||||
InputMessage();
|
||||
|
@@ -48,7 +48,7 @@ namespace Otc
|
||||
ANIMATED_TEXT_DURATION = 1000,
|
||||
STATIC_DURATION_PER_CHARACTER = 60,
|
||||
MIN_STATIC_TEXT_DURATION = 3000,
|
||||
MAX_STATIC_TEXT_WIDTH = 200,
|
||||
MAX_STATIC_TEXT_WIDTH = 200
|
||||
};
|
||||
|
||||
enum DrawFlags {
|
||||
@@ -309,6 +309,7 @@ namespace Otc
|
||||
GameTrucatedPingOpcode,
|
||||
GameReverseCreatureStack,
|
||||
GameMagicEffectU16,
|
||||
GamePlayerMarket,
|
||||
LastGameFeature
|
||||
};
|
||||
|
||||
@@ -317,7 +318,7 @@ namespace Otc
|
||||
PATHFIND_SAME_POSITION,
|
||||
PATHFIND_IMPOSSIBLE,
|
||||
PATHFIND_TOO_FAR,
|
||||
PATHFIND_NO_WAY,
|
||||
PATHFIND_NO_WAY
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -38,14 +38,14 @@ Game g_game;
|
||||
Game::Game()
|
||||
{
|
||||
resetGameStates();
|
||||
setClientVersion(860);
|
||||
setClientVersion(954);
|
||||
}
|
||||
|
||||
void Game::resetGameStates()
|
||||
{
|
||||
m_denyBotCall = false;
|
||||
m_dead = false;
|
||||
m_mounted = false;
|
||||
m_mounted = false;
|
||||
m_serverBeat = 50;
|
||||
m_canReportBugs = false;
|
||||
m_fightMode = Otc::FightBalanced;
|
||||
@@ -1135,6 +1135,10 @@ void Game::setClientVersion(int clientVersion)
|
||||
enableFeature(Otc::GameItemAnimationPhase);
|
||||
}
|
||||
|
||||
if(clientVersion >= 940) {
|
||||
enableFeature(Otc::GamePlayerMarket);
|
||||
}
|
||||
|
||||
if(clientVersion >= 953) {
|
||||
enableFeature(Otc::GameCreaturePassableInfo);
|
||||
enableFeature(Otc::GameTrucatedPingOpcode);
|
||||
|
@@ -301,13 +301,6 @@ void ProtocolGame::parseMessage(const InputMessagePtr& msg)
|
||||
case Proto::GameServerPlayerInventory:
|
||||
parsePlayerInventory(msg);
|
||||
break;
|
||||
// PROTOCOL>=944
|
||||
/*
|
||||
case Proto::GameServerMarketEnter:
|
||||
case Proto::GameServerMarketLeave:
|
||||
case Proto::GameServerMarketDetail:
|
||||
case Proto::GameServerMarketBrowse:
|
||||
*/
|
||||
// otclient ONLY
|
||||
case Proto::GameServerExtendedOpcode:
|
||||
parseExtendedOpcode(msg);
|
||||
@@ -1135,7 +1128,6 @@ void ProtocolGame::parseOpenOutfitWindow(const InputMessagePtr& msg)
|
||||
Outfit currentOutfit = getOutfit(msg);
|
||||
|
||||
std::vector<std::tuple<int, std::string, int> > outfitList;
|
||||
std::vector<std::tuple<int, std::string> > mountList;
|
||||
int outfitCount = msg->getU8();
|
||||
for(int i = 0; i < outfitCount; i++) {
|
||||
int outfitId = msg->getU16();
|
||||
@@ -1145,6 +1137,7 @@ void ProtocolGame::parseOpenOutfitWindow(const InputMessagePtr& msg)
|
||||
outfitList.push_back(std::make_tuple(outfitId, outfitName, outfitAddons));
|
||||
}
|
||||
|
||||
std::vector<std::tuple<int, std::string> > mountList;
|
||||
if(g_game.getFeature(Otc::GamePlayerMounts)) {
|
||||
int mountCount = msg->getU8();
|
||||
for(int i = 0; i < mountCount; ++i) {
|
||||
|
Reference in New Issue
Block a user