mirror of
https://github.com/edubart/otclient.git
synced 2025-12-02 16:06:51 +01:00
Speed up compilation time for luafunctions
* Other compile fixes for gcc
This commit is contained in:
@@ -102,3 +102,6 @@ set(client_SOURCES ${client_SOURCES}
|
||||
# util
|
||||
${CMAKE_CURRENT_LIST_DIR}/position.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/luafunctions.cpp
|
||||
PROPERTIES LANGUAGE CXX COMPILE_FLAGS "-g0 -O0")
|
||||
|
||||
@@ -354,10 +354,10 @@ void Game::processRuleViolationLock()
|
||||
g_lua.callGlobalField("g_game", "onRuleViolationLock");
|
||||
}
|
||||
|
||||
void Game::processVipAdd(uint id, const std::string& name, uint status)
|
||||
void Game::processVipAdd(uint id, const std::string& name, uint status, int iconId, bool notifyLogin)
|
||||
{
|
||||
m_vips[id] = Vip(name, status);
|
||||
g_lua.callGlobalField("g_game", "onAddVip", id, name, status);
|
||||
g_lua.callGlobalField("g_game", "onAddVip", id, name, status, iconId, notifyLogin);
|
||||
}
|
||||
|
||||
void Game::processVipStateChange(uint id, uint status)
|
||||
|
||||
@@ -98,7 +98,7 @@ protected:
|
||||
void processRuleViolationLock();
|
||||
|
||||
// vip related
|
||||
void processVipAdd(uint id, const std::string& name, uint status);
|
||||
void processVipAdd(uint id, const std::string& name, uint status, int iconId, bool notifyLogin);
|
||||
void processVipStateChange(uint id, uint status);
|
||||
|
||||
// tutorial hint
|
||||
|
||||
@@ -1370,20 +1370,20 @@ void ProtocolGame::parseOpenOutfitWindow(const InputMessagePtr& msg)
|
||||
|
||||
void ProtocolGame::parseVipAdd(const InputMessagePtr& msg)
|
||||
{
|
||||
uint id, markId, status;
|
||||
uint id, iconId = 0, status;
|
||||
std::string name, desc;
|
||||
bool notifyLogin;
|
||||
bool notifyLogin = false;
|
||||
|
||||
id = msg->getU32();
|
||||
name = g_game.formatCreatureName(msg->getString());
|
||||
if(g_game.getProtocolVersion() >= 963) {
|
||||
desc = msg->getString();
|
||||
markId = msg->getU32();
|
||||
iconId = msg->getU32();
|
||||
notifyLogin = msg->getU8();
|
||||
}
|
||||
status = msg->getU8();
|
||||
|
||||
g_game.processVipAdd(id, name, status);
|
||||
g_game.processVipAdd(id, name, status, iconId, notifyLogin);
|
||||
}
|
||||
|
||||
void ProtocolGame::parseVipState(const InputMessagePtr& msg)
|
||||
|
||||
Reference in New Issue
Block a user