aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
authorrunningnak3d <runningnak3d@gmail.com>2011-02-11 13:04:45 -0700
committerrunningnak3d <runningnak3d@gmail.com>2011-02-11 13:04:45 -0700
commit05e075ce0ec0b758bca9a183b3a401c620fd58a7 (patch)
tree2407211a570a2b9efb779578612c10fc67c4d4a1 /src/server/game
parente609d18588a7941353e356731c6a5a0aace14d8f (diff)
Core/Gossip: Remove support for `npc_gossip` table (DEPRECATED).
Diffstat (limited to 'src/server/game')
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp46
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.cpp47
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.h2
-rwxr-xr-xsrc/server/game/World/World.cpp3
4 files changed, 0 insertions, 98 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 2a664a2bbd9..4072d857233 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -14196,52 +14196,6 @@ void Player::SendPreparedQuest(uint64 guid)
}
}
}
- // multiply entries
- else
- {
- QEmote qe;
- qe._Delay = 0;
- qe._Emote = 0;
- std::string title = "";
-
- // need pet case for some quests
- Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
- if (pCreature)
- {
- uint32 textid = GetGossipTextId(pCreature);
- GossipText const* gossiptext = sObjectMgr->GetGossipText(textid);
- if (!gossiptext)
- {
- qe._Delay = 0; //TEXTEMOTE_MESSAGE; //zyg: player emote
- qe._Emote = 0; //TEXTEMOTE_HELLO; //zyg: NPC emote
- title = "";
- }
- else
- {
- qe = gossiptext->Options[0].Emotes[0];
-
- if (!gossiptext->Options[0].Text_0.empty())
- {
- title = gossiptext->Options[0].Text_0;
-
- int loc_idx = GetSession()->GetSessionDbLocaleIndex();
- if (loc_idx >= 0)
- if (NpcTextLocale const *nl = sObjectMgr->GetNpcTextLocale(textid))
- sObjectMgr->GetLocaleString(nl->Text_0[0], loc_idx, title);
- }
- else
- {
- title = gossiptext->Options[0].Text_1;
-
- int loc_idx = GetSession()->GetSessionDbLocaleIndex();
- if (loc_idx >= 0)
- if (NpcTextLocale const *nl = sObjectMgr->GetNpcTextLocale(textid))
- sObjectMgr->GetLocaleString(nl->Text_1[0], loc_idx, title);
- }
- }
- }
- PlayerTalkClass->SendQuestGiverQuestList(qe, title, guid);
- }
}
bool Player::IsActiveQuest(uint32 quest_id) const
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 16198d2c86c..13438393bc4 100755
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -8787,53 +8787,6 @@ void ObjectMgr::LoadVendors()
sLog->outString();
}
-void ObjectMgr::LoadNpcTextId()
-{
- uint32 oldMSTime = getMSTime();
-
- m_mCacheNpcTextIdMap.clear();
-
- QueryResult result = WorldDatabase.Query("SELECT npc_guid, textid FROM npc_gossip");
-
- if (!result)
- {
- sLog->outErrorDb(">> Loaded 0 NpcTextId. DB table `npc_gossip` is empty!");
- sLog->outString();
- return;
- }
-
- uint32 count = 0;
- uint32 guid, textid;
-
- do
- {
-
- Field* fields = result->Fetch();
-
- guid = fields[0].GetUInt32();
- textid = fields[1].GetUInt32();
-
- if (!GetCreatureData(guid))
- {
- sLog->outErrorDb("Table `npc_gossip` have not existed creature (GUID: %u) entry, ignore. ",guid);
- continue;
- }
- if (!GetGossipText(textid))
- {
- sLog->outErrorDb("Table `npc_gossip` for creature (GUID: %u) have wrong Textid (%u), ignore. ", guid, textid);
- continue;
- }
-
- m_mCacheNpcTextIdMap[guid] = textid ;
- ++count;
-
- }
- while (result->NextRow());
-
- sLog->outString(">> Loaded %d NpcTextId in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
-}
-
void ObjectMgr::LoadGossipMenu()
{
uint32 oldMSTime = getMSTime();
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index 13d3a3ec418..99e4d8d7464 100755
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -947,8 +947,6 @@ class ObjectMgr
void LoadGameTele();
- void LoadNpcTextId();
-
void LoadGossipMenu();
void LoadGossipMenuItems();
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index ab5071a18bd..b931db7a681 100755
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -1521,9 +1521,6 @@ void World::SetInitialWorldSettings()
sLog->outString("Loading GameTeleports...");
sObjectMgr->LoadGameTele();
- sLog->outString("Loading Npc Text Id...");
- sObjectMgr->LoadNpcTextId(); // must be after load Creature and NpcText
-
sObjectMgr->LoadGossipScripts(); // must be before gossip menu options
sLog->outString("Loading Gossip menu...");