mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 04:24:54 +02:00
Minimap fix and remove option
This commit is contained in:
@@ -347,6 +347,7 @@ namespace Otc
|
||||
GameLoginPending = 35,
|
||||
GameNewSpeedLaw = 36,
|
||||
GameForceFirstAutoWalkStep = 37,
|
||||
GameMinimapRemove = 38,
|
||||
// 51-100 reserved to be defined in lua
|
||||
LastGameFeature = 101
|
||||
};
|
||||
|
@@ -371,9 +371,14 @@ void Game::processTutorialHint(int id)
|
||||
g_lua.callGlobalField("g_game", "onTutorialHint", id);
|
||||
}
|
||||
|
||||
void Game::processAutomapFlag(const Position& pos, int icon, const std::string& message)
|
||||
void Game::processAddAutomapFlag(const Position& pos, int icon, const std::string& message)
|
||||
{
|
||||
g_lua.callGlobalField("g_game", "onAutomapFlag", pos, icon, message);
|
||||
g_lua.callGlobalField("g_game", "onAddAutomapFlag", pos, icon, message);
|
||||
}
|
||||
|
||||
void Game::processRemoveAutomapFlag(const Position& pos, int icon, const std::string& message)
|
||||
{
|
||||
g_lua.callGlobalField("g_game", "onRemoveAutomapFlag", pos, icon, message);
|
||||
}
|
||||
|
||||
void Game::processOpenOutfitWindow(const Outfit& currentOufit, const std::vector<std::tuple<int, std::string, int> >& outfitList,
|
||||
|
@@ -103,7 +103,8 @@ protected:
|
||||
|
||||
// tutorial hint
|
||||
void processTutorialHint(int id);
|
||||
void processAutomapFlag(const Position& pos, int icon, const std::string& message);
|
||||
void processAddAutomapFlag(const Position& pos, int icon, const std::string& message);
|
||||
void processRemoveAutomapFlag(const Position& pos, int icon, const std::string& message);
|
||||
|
||||
// outfit
|
||||
void processOpenOutfitWindow(const Outfit& currentOufit, const std::vector<std::tuple<int, std::string, int> >& outfitList,
|
||||
|
@@ -1406,17 +1406,24 @@ void ProtocolGame::parseVipLogout(const InputMessagePtr& msg)
|
||||
|
||||
void ProtocolGame::parseTutorialHint(const InputMessagePtr& msg)
|
||||
{
|
||||
int id = msg->getU8(); // tutorial id
|
||||
int id = msg->getU8();
|
||||
g_game.processTutorialHint(id);
|
||||
}
|
||||
|
||||
void ProtocolGame::parseAutomapFlag(const InputMessagePtr& msg)
|
||||
{
|
||||
Position pos = getPosition(msg); // position
|
||||
int icon = msg->getU8(); // icon
|
||||
std::string description = msg->getString(); // message
|
||||
Position pos = getPosition(msg);
|
||||
int icon = msg->getU8();
|
||||
std::string description = msg->getString();
|
||||
|
||||
g_game.processAutomapFlag(pos, icon, description);
|
||||
bool remove = false;
|
||||
if(g_game.getFeature(Otc::GameMinimapRemove))
|
||||
remove = msg->getU8() != 0;
|
||||
|
||||
if(!remove)
|
||||
g_game.processAddAutomapFlag(pos, icon, description);
|
||||
else
|
||||
g_game.processRemoveAutomapFlag(pos, icon, description);
|
||||
}
|
||||
|
||||
void ProtocolGame::parseQuestLog(const InputMessagePtr& msg)
|
||||
|
Reference in New Issue
Block a user