Hello, Corrections of some syntax error made by Ymir;
cmd_general.cpp Find:
- ACMD(do_shutdown)
- {
- if (NULL == ch)
- {
- sys_err("Accept shutdown command from %s.", ch->GetName());
- }
- TPacketGGShutdown p;
- p.bHeader = HEADER_GG_SHUTDOWN;
- P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGShutdown));
- Shutdown(10);
- }
Alles anzeigen
Replace:
- ACMD(do_shutdown)
- {
- if (!ch)
- return;
- sys_err("Accept shutdown command from %s.", ch->GetName());
- TPacketGGShutdown p;
- p.bHeader = HEADER_GG_SHUTDOWN;
- P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGShutdown));
- Shutdown(10);
- }
Alles anzeigen
Dungeon.cpp Find:
- float CDungeon::GetUniqueHpPerc(const std::string& key)
- {
- TUniqueMobMap::iterator it = m_map_UniqueMob.find(key);
- if (it == m_map_UniqueMob.end())
- {
- sys_err("Unknown Key : %s", key.c_str());
- return false;
- }
- return (100.f*it->second->GetHP())/it->second->GetMaxHP();
- }
Replace:
- float CDungeon::GetUniqueHpPerc(const std::string& key)
- {
- TUniqueMobMap::iterator it = m_map_UniqueMob.find(key);
- if (it == m_map_UniqueMob.end())
- {
- sys_err("Unknown Key : %s", key.c_str());
- return 0.0f;
- }
- return (100.f*it->second->GetHP())/it->second->GetMaxHP();
- }
ClientManager.cpp Find:
Replace: