LucasFerraz
Systems Analyst
Function: Less lag than Talkaction/Globalevent at server save
Author(?): Shynzo in brazilian forum
In commands.cpp after
Code:
{"!joinguild", &Commands::joinGuild},
add
Code:
{"/save",&Commands::saveGame},
At the end in commands.cpp add:
Code:
bool Commands::saveGame(Creature* creature, const std::string& cmd, const std::string& param)
{
Player* player = creature->getPlayer();
AutoList<Player>::listiterator it = Player::listPlayer.list.begin();
g_game.saveGameState(true);
if(player)
player->sendTextMessage(MSG_STATUS_CONSOLE_ORANGE, "Save server completed.");
}
In commands.h after
Code:
bool ghost(Creature* creature, const std::string& cmd, const std::string& param);
add
Code:
bool saveGame(Creature* creature, const std::string& cmd, const std::string& param);