Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 20th, 2010 | Syntax: None | Size: 1.01 KB | Hits: 85 | Expires: Never
Copy text to clipboard
  1. -                                       case AREA_TRIGGER_FAILURE_NO_KEY:
  2. +                                       case AREA_TRIGGER_FAILURE_DBC_MESSAGE:
  3.                                                 {
  4. -                                                       MapInfo * pMi = WorldMapInfoStorage.LookupEntry(pAreaTrigger->Mapid);
  5. -                                                       string temp_msg[2];
  6. -                                                       string tmp_msg;
  7. -                                                       for(uint32 i = 0; i < 2; ++i)
  8. -                                                       {
  9. -                                                               if (pMi->heroic_key[i] && _player->GetItemInterface()->GetItemCount(pMi->heroic_key[i], false)==0)
  10. -                                                               {
  11. -                                                                       ItemPrototype * pKey = ItemPrototypeStorage.LookupEntry(pMi->heroic_key[i]);
  12. -                                                                       if(pKey)
  13. -                                                                               temp_msg[i] += pKey->Name1;
  14. -                                                                       else
  15. -                                                                               temp_msg[i] += "UNKNOWN";
  16. -                                                               }
  17. -                                                       }
  18. -                                                       tmp_msg += temp_msg[0];
  19. -                                                       if(temp_msg[0].size() && temp_msg[1].size())
  20. -                                                               tmp_msg += "\" and \"";
  21. -                                                       tmp_msg += temp_msg[1];
  22. -
  23. -                                                       snprintf(msg, 200, pReason, tmp_msg.c_str());
  24. -                                                       data << msg;
  25. +                                                       MapDifficultyEntry *pMi = sInstanceMgr.GetMapDifficulty(mapId, difficulty);
  26. +                                                       data << pMi ? pMi->errorMsg : "Selected difficulty not available.";
  27.                                                 }break;