Core/Cleanup: Drop various unused code
This commit is contained in:
@@ -16,66 +16,9 @@
|
|||||||
#define GOSSIP_TEXT_BROWSE_GOODS "I'd like to browse your goods."
|
#define GOSSIP_TEXT_BROWSE_GOODS "I'd like to browse your goods."
|
||||||
#define GOSSIP_TEXT_TRAIN "Train me!"
|
#define GOSSIP_TEXT_TRAIN "Train me!"
|
||||||
|
|
||||||
#define GOSSIP_TEXT_BANK "The bank"
|
|
||||||
#define GOSSIP_TEXT_IRONFORGE_BANK "The bank of Ironforge"
|
|
||||||
#define GOSSIP_TEXT_STORMWIND_BANK "The bank of Stormwind"
|
|
||||||
#define GOSSIP_TEXT_WINDRIDER "The wind rider master"
|
|
||||||
#define GOSSIP_TEXT_GRYPHON "The gryphon master"
|
|
||||||
#define GOSSIP_TEXT_BATHANDLER "The bat handler"
|
|
||||||
#define GOSSIP_TEXT_HIPPOGRYPH "The hippogryph master"
|
|
||||||
#define GOSSIP_TEXT_ZEPPLINMASTER "The zeppelin master"
|
|
||||||
#define GOSSIP_TEXT_DEEPRUNTRAM "The Deeprun Tram"
|
|
||||||
#define GOSSIP_TEXT_FERRY "The Rut'theran Ferry"
|
|
||||||
#define GOSSIP_TEXT_FLIGHTMASTER "The flight master"
|
|
||||||
#define GOSSIP_TEXT_AUCTIONHOUSE "The auction house"
|
|
||||||
#define GOSSIP_TEXT_GUILDMASTER "The guild master"
|
|
||||||
#define GOSSIP_TEXT_INN "The inn"
|
|
||||||
#define GOSSIP_TEXT_MAILBOX "The mailbox"
|
|
||||||
#define GOSSIP_TEXT_STABLEMASTER "The stable master"
|
|
||||||
#define GOSSIP_TEXT_WEAPONMASTER "The weapon master"
|
|
||||||
#define GOSSIP_TEXT_OFFICERS "The officers' lounge"
|
|
||||||
#define GOSSIP_TEXT_BATTLEMASTER "The battlemaster"
|
|
||||||
#define GOSSIP_TEXT_BARBER "Barber"
|
|
||||||
#define GOSSIP_TEXT_CLASSTRAINER "A class trainer"
|
|
||||||
#define GOSSIP_TEXT_PROFTRAINER "A profession trainer"
|
|
||||||
#define GOSSIP_TEXT_LEXICON "Lexicon of Power"
|
|
||||||
|
|
||||||
#define GOSSIP_TEXT_ALTERACVALLEY "Alterac Valley"
|
|
||||||
#define GOSSIP_TEXT_ARATHIBASIN "Arathi Basin"
|
|
||||||
#define GOSSIP_TEXT_WARSONGULCH "Warsong Gulch"
|
|
||||||
#define GOSSIP_TEXT_ARENA "Arena"
|
|
||||||
#define GOSSIP_TEXT_EYEOFTHESTORM "Eye of The Storm"
|
|
||||||
#define GOSSIP_TEXT_STRANDOFANCIENT "Strand of the Ancients"
|
|
||||||
|
|
||||||
#define GOSSIP_TEXT_DEATH_KNIGHT "Death Knight"
|
|
||||||
#define GOSSIP_TEXT_DRUID "Druid"
|
|
||||||
#define GOSSIP_TEXT_HUNTER "Hunter"
|
|
||||||
#define GOSSIP_TEXT_PRIEST "Priest"
|
|
||||||
#define GOSSIP_TEXT_ROGUE "Rogue"
|
|
||||||
#define GOSSIP_TEXT_WARRIOR "Warrior"
|
|
||||||
#define GOSSIP_TEXT_PALADIN "Paladin"
|
|
||||||
#define GOSSIP_TEXT_SHAMAN "Shaman"
|
|
||||||
#define GOSSIP_TEXT_MAGE "Mage"
|
|
||||||
#define GOSSIP_TEXT_WARLOCK "Warlock"
|
|
||||||
|
|
||||||
#define GOSSIP_TEXT_ALCHEMY "Alchemy"
|
|
||||||
#define GOSSIP_TEXT_BLACKSMITHING "Blacksmithing"
|
|
||||||
#define GOSSIP_TEXT_COOKING "Cooking"
|
|
||||||
#define GOSSIP_TEXT_ENCHANTING "Enchanting"
|
|
||||||
#define GOSSIP_TEXT_ENGINEERING "Engineering"
|
|
||||||
#define GOSSIP_TEXT_FIRSTAID "First Aid"
|
|
||||||
#define GOSSIP_TEXT_HERBALISM "Herbalism"
|
|
||||||
#define GOSSIP_TEXT_INSCRIPTION "Inscription"
|
|
||||||
#define GOSSIP_TEXT_JEWELCRAFTING "Jewelcrafting"
|
|
||||||
#define GOSSIP_TEXT_LEATHERWORKING "Leatherworking"
|
|
||||||
#define GOSSIP_TEXT_TAILORING "Tailoring"
|
|
||||||
#define GOSSIP_TEXT_MINING "Mining"
|
|
||||||
#define GOSSIP_TEXT_FISHING "Fishing"
|
|
||||||
#define GOSSIP_TEXT_SKINNING "Skinning"
|
|
||||||
|
|
||||||
enum eTradeskill
|
enum eTradeskill
|
||||||
{
|
{
|
||||||
// Skill defines
|
// Skill defines
|
||||||
TRADESKILL_ALCHEMY = 1,
|
TRADESKILL_ALCHEMY = 1,
|
||||||
TRADESKILL_BLACKSMITHING = 2,
|
TRADESKILL_BLACKSMITHING = 2,
|
||||||
TRADESKILL_COOKING = 3,
|
TRADESKILL_COOKING = 3,
|
||||||
@@ -100,7 +43,7 @@ enum eTradeskill
|
|||||||
TRADESKILL_LEVEL_MASTER = 5,
|
TRADESKILL_LEVEL_MASTER = 5,
|
||||||
TRADESKILL_LEVEL_GRAND_MASTER = 6,
|
TRADESKILL_LEVEL_GRAND_MASTER = 6,
|
||||||
|
|
||||||
// Gossip defines
|
// Gossip defines
|
||||||
GOSSIP_ACTION_TRADE = 1,
|
GOSSIP_ACTION_TRADE = 1,
|
||||||
GOSSIP_ACTION_TRAIN = 2,
|
GOSSIP_ACTION_TRAIN = 2,
|
||||||
GOSSIP_ACTION_TAXI = 3,
|
GOSSIP_ACTION_TAXI = 3,
|
||||||
@@ -127,8 +70,6 @@ enum eTradeskill
|
|||||||
GOSSIP_SENDER_SEC_STABLEMASTER = 10
|
GOSSIP_SENDER_SEC_STABLEMASTER = 10
|
||||||
};
|
};
|
||||||
|
|
||||||
extern uint32 GetSkillLevel(Player *player,uint32 skill);
|
|
||||||
|
|
||||||
// Defined fuctions to use with player.
|
// Defined fuctions to use with player.
|
||||||
|
|
||||||
// This fuction add's a menu item,
|
// This fuction add's a menu item,
|
||||||
@@ -144,44 +85,11 @@ extern uint32 GetSkillLevel(Player *player,uint32 skill);
|
|||||||
// This fuction Sends the current menu to show to client, a - NPCTEXTID(uint32) , b - npc guid(uint64)
|
// This fuction Sends the current menu to show to client, a - NPCTEXTID(uint32) , b - npc guid(uint64)
|
||||||
#define SEND_GOSSIP_MENU(a,b) PlayerTalkClass->SendGossipMenu(a,b)
|
#define SEND_GOSSIP_MENU(a,b) PlayerTalkClass->SendGossipMenu(a,b)
|
||||||
|
|
||||||
// This fuction shows POI(point of interest) to client.
|
|
||||||
// a - position X
|
|
||||||
// b - position Y
|
|
||||||
// c - Icon Id
|
|
||||||
// d - Flags
|
|
||||||
// e - Data
|
|
||||||
// f - Location Name
|
|
||||||
#define SEND_POI(a,b,c,d,e,f) PlayerTalkClass->SendPointOfInterest(a,b,c,d,e,f)
|
|
||||||
|
|
||||||
// Closes the Menu
|
// Closes the Menu
|
||||||
#define CLOSE_GOSSIP_MENU() PlayerTalkClass->CloseGossip()
|
#define CLOSE_GOSSIP_MENU() PlayerTalkClass->CloseGossip()
|
||||||
|
|
||||||
// Fuction to tell to client the details
|
|
||||||
// a - quest object
|
|
||||||
// b - npc guid(uint64)
|
|
||||||
// c - Activate accept(bool)
|
|
||||||
#define SEND_QUEST_DETAILS(a,b,c) PlayerTalkClass->SendQuestDetails(a,b,c)
|
|
||||||
|
|
||||||
// Fuction to tell to client the requested items to complete quest
|
|
||||||
// a - quest object
|
|
||||||
// b - npc guid(uint64)
|
|
||||||
// c - Iscompletable(bool)
|
|
||||||
// d - close at cancel(bool) - in case single incomplite ques
|
|
||||||
#define SEND_REQUESTEDITEMS(a,b,c,d) PlayerTalkClass->SendRequestedItems(a,b,c,d)
|
|
||||||
|
|
||||||
// Fuctions to send NPC lists, a - is always the npc guid(uint64)
|
// Fuctions to send NPC lists, a - is always the npc guid(uint64)
|
||||||
#define SEND_VENDORLIST(a) GetSession()->SendListInventory(a)
|
#define SEND_VENDORLIST(a) GetSession()->SendListInventory(a)
|
||||||
#define SEND_TRAINERLIST(a) GetSession()->SendTrainerList(a)
|
#define SEND_TRAINERLIST(a) GetSession()->SendTrainerList(a)
|
||||||
|
|
||||||
// Ressurect's the player if is dead.
|
|
||||||
#define SEND_SPRESURRECT() GetSession()->SendSpiritResurrect()
|
|
||||||
|
|
||||||
// Get the player's honor rank.
|
|
||||||
#define GET_HONORRANK() GetHonorRank()
|
|
||||||
// -----------------------------------
|
|
||||||
|
|
||||||
// defined fuctions to use with Creature
|
|
||||||
|
|
||||||
#define QUEST_DIALOG_STATUS(a,b,c) GetSession()->getDialogStatus(a,b,c)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1755,38 +1755,6 @@ char* ChatHandler::extractKeyFromLink(char* text, char const* const* linkTypes,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
char const *fmtstring(char const *format, ...)
|
|
||||||
{
|
|
||||||
va_list argptr;
|
|
||||||
#define MAX_FMT_STRING 32000
|
|
||||||
static char temp_buffer[MAX_FMT_STRING];
|
|
||||||
static char string[MAX_FMT_STRING];
|
|
||||||
static int index = 0;
|
|
||||||
char *buf;
|
|
||||||
int len;
|
|
||||||
|
|
||||||
va_start(argptr, format);
|
|
||||||
vsnprintf(temp_buffer,MAX_FMT_STRING, format, argptr);
|
|
||||||
va_end(argptr);
|
|
||||||
|
|
||||||
len = strlen(temp_buffer);
|
|
||||||
|
|
||||||
if (len >= MAX_FMT_STRING)
|
|
||||||
return "ERROR";
|
|
||||||
|
|
||||||
if (len + index >= MAX_FMT_STRING-1)
|
|
||||||
{
|
|
||||||
index = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf = &string[index];
|
|
||||||
memcpy(buf, temp_buffer, len+1);
|
|
||||||
|
|
||||||
index += len + 1;
|
|
||||||
|
|
||||||
return buf;
|
|
||||||
}
|
|
||||||
|
|
||||||
GameObject* ChatHandler::GetNearbyGameObject()
|
GameObject* ChatHandler::GetNearbyGameObject()
|
||||||
{
|
{
|
||||||
if (!m_session)
|
if (!m_session)
|
||||||
|
|||||||
@@ -402,7 +402,4 @@ class CliHandler : public ChatHandler
|
|||||||
Print* m_print;
|
Print* m_print;
|
||||||
};
|
};
|
||||||
|
|
||||||
char const *fmtstring(char const *format, ...);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -229,100 +229,6 @@ void PlayerMenu::SendPointOfInterest(uint32 poi_id)
|
|||||||
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Sent SMSG_GOSSIP_POI");
|
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Sent SMSG_GOSSIP_POI");
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerMenu::SendTalking(uint32 textID)
|
|
||||||
{
|
|
||||||
GossipText const* pGossip = sObjectMgr->GetGossipText(textID);
|
|
||||||
|
|
||||||
WorldPacket data(SMSG_NPC_TEXT_UPDATE, 100); // guess size
|
|
||||||
data << textID; // can be < 0
|
|
||||||
|
|
||||||
if (!pGossip)
|
|
||||||
{
|
|
||||||
for (uint32 i = 0; i < MAX_GOSSIP_TEXT_OPTIONS; ++i)
|
|
||||||
{
|
|
||||||
data << float(0);
|
|
||||||
data << "Greetings $N";
|
|
||||||
data << "Greetings $N";
|
|
||||||
data << uint32(0);
|
|
||||||
data << uint32(0);
|
|
||||||
data << uint32(0);
|
|
||||||
data << uint32(0);
|
|
||||||
data << uint32(0);
|
|
||||||
data << uint32(0);
|
|
||||||
data << uint32(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::string Text_0[MAX_LOCALES], Text_1[MAX_LOCALES];
|
|
||||||
for (int i = 0; i < MAX_GOSSIP_TEXT_OPTIONS; ++i)
|
|
||||||
{
|
|
||||||
Text_0[i] = pGossip->Options[i].Text_0;
|
|
||||||
Text_1[i] = pGossip->Options[i].Text_1;
|
|
||||||
}
|
|
||||||
int loc_idx = pSession->GetSessionDbLocaleIndex();
|
|
||||||
if (loc_idx >= 0)
|
|
||||||
{
|
|
||||||
if (NpcTextLocale const *nl = sObjectMgr->GetNpcTextLocale(textID))
|
|
||||||
{
|
|
||||||
for (int i = 0; i < MAX_LOCALES; ++i)
|
|
||||||
{
|
|
||||||
sObjectMgr->GetLocaleString(nl->Text_0[i], loc_idx, Text_0[i]);
|
|
||||||
sObjectMgr->GetLocaleString(nl->Text_1[i], loc_idx, Text_1[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (int i = 0; i < MAX_GOSSIP_TEXT_OPTIONS; ++i)
|
|
||||||
{
|
|
||||||
data << pGossip->Options[i].Probability;
|
|
||||||
|
|
||||||
if (Text_0[i].empty())
|
|
||||||
data << Text_1[i];
|
|
||||||
else
|
|
||||||
data << Text_0[i];
|
|
||||||
|
|
||||||
if (Text_1[i].empty())
|
|
||||||
data << Text_0[i];
|
|
||||||
else
|
|
||||||
data << Text_1[i];
|
|
||||||
|
|
||||||
data << pGossip->Options[i].Language;
|
|
||||||
|
|
||||||
for (int j = 0; j < MAX_GOSSIP_TEXT_EMOTES; ++j)
|
|
||||||
{
|
|
||||||
data << pGossip->Options[i].Emotes[j]._Delay;
|
|
||||||
data << pGossip->Options[i].Emotes[j]._Emote;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pSession->SendPacket(&data);
|
|
||||||
|
|
||||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_NPC_TEXT_UPDATE ");
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlayerMenu::SendTalking(char const * title, char const * text)
|
|
||||||
{
|
|
||||||
WorldPacket data(SMSG_NPC_TEXT_UPDATE, 50); // guess size
|
|
||||||
data << uint32(0);
|
|
||||||
for (uint32 i = 0; i < MAX_GOSSIP_TEXT_OPTIONS; ++i)
|
|
||||||
{
|
|
||||||
data << float(0);
|
|
||||||
data << title;
|
|
||||||
data << text;
|
|
||||||
data << uint32(0);
|
|
||||||
data << uint32(0);
|
|
||||||
data << uint32(0);
|
|
||||||
data << uint32(0);
|
|
||||||
data << uint32(0);
|
|
||||||
data << uint32(0);
|
|
||||||
data << uint32(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
pSession->SendPacket(&data);
|
|
||||||
|
|
||||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_NPC_TEXT_UPDATE ");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
/*** QUEST SYSTEM ***/
|
/*** QUEST SYSTEM ***/
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
|
|||||||
@@ -261,8 +261,6 @@ class PlayerMenu
|
|||||||
void CloseGossip();
|
void CloseGossip();
|
||||||
void SendPointOfInterest(float X, float Y, uint32 Icon, uint32 Flags, uint32 Data, const char * locName);
|
void SendPointOfInterest(float X, float Y, uint32 Icon, uint32 Flags, uint32 Data, const char * locName);
|
||||||
void SendPointOfInterest(uint32 poi_id);
|
void SendPointOfInterest(uint32 poi_id);
|
||||||
void SendTalking(uint32 textID);
|
|
||||||
void SendTalking(char const * title, char const * text);
|
|
||||||
|
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
/*** QUEST SYSTEM ***/
|
/*** QUEST SYSTEM ***/
|
||||||
|
|||||||
@@ -36,8 +36,6 @@ enum OutdoorPvPTypes
|
|||||||
|
|
||||||
#define MAX_OUTDOORPVP_TYPES 7
|
#define MAX_OUTDOORPVP_TYPES 7
|
||||||
|
|
||||||
const uint8 CapturePointArtKit[3] = {2, 1, 21};
|
|
||||||
|
|
||||||
enum ObjectiveStates
|
enum ObjectiveStates
|
||||||
{
|
{
|
||||||
OBJECTIVESTATE_NEUTRAL = 0,
|
OBJECTIVESTATE_NEUTRAL = 0,
|
||||||
|
|||||||
@@ -774,7 +774,6 @@ class World
|
|||||||
uint32 m_updateTimeCount;
|
uint32 m_updateTimeCount;
|
||||||
uint32 m_currentTime;
|
uint32 m_currentTime;
|
||||||
|
|
||||||
//typedef UNORDERED_MAP<uint32, WorldSession*> SessionMap;
|
|
||||||
SessionMap m_sessions;
|
SessionMap m_sessions;
|
||||||
typedef UNORDERED_MAP<uint32, time_t> DisconnectMap;
|
typedef UNORDERED_MAP<uint32, time_t> DisconnectMap;
|
||||||
DisconnectMap m_disconnects;
|
DisconnectMap m_disconnects;
|
||||||
|
|||||||
Reference in New Issue
Block a user