Jump to content

[not confirmed] wrong mangos_string


Schmoozerd

Recommended Posts

why do you say so: (from ~10300)

it's both for IDs

void ChatHandler::ShowNpcOrGoSpawnInformation(uint32 guid)
{
   if (uint16 pool_id = sPoolMgr.IsPartOfAPool<T>(guid))
   {
       uint16 top_pool_id = sPoolMgr.IsPartOfTopPool<Pool>(pool_id);
       if (!top_pool_id || top_pool_id == pool_id)
           PSendSysMessage(LANG_NPC_GO_INFO_POOL, pool_id);
       else
          [color=RED] PSendSysMessage(LANG_NPC_GO_INFO_TOP_POOL, pool_id, top_pool_id);[/color]

       if (int16 event_id = sGameEventMgr.GetGameEventId<Pool>(top_pool_id))
       {
           GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
           GameEventData const& eventData = events[std::abs(event_id)];

           if (event_id > 0)
               PSendSysMessage(LANG_NPC_GO_INFO_POOL_GAME_EVENT_S, top_pool_id, std::abs(event_id), eventData.description.c_str());
           else
               PSendSysMessage(LANG_NPC_GO_INFO_POOL_GAME_EVENT_D, top_pool_id, std::abs(event_id), eventData.description.c_str());
       }
   }
   else if (int16 event_id = sGameEventMgr.GetGameEventId<T>(guid))
   {
       GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
       GameEventData const& eventData = events[std::abs(event_id)];

       if (event_id > 0)
           PSendSysMessage(LANG_NPC_GO_INFO_GAME_EVENT_S, std::abs(event_id), eventData.description.c_str());
       else
           PSendSysMessage(LANG_NPC_GO_INFO_GAME_EVENT_D, std::abs(event_id), eventData.description.c_str());
   }
}

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use