mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
Removed some unnecessary database queries.
Removed unnecessary database queries in some command handlers. Replaced them with access to cached data or queries for only the needed data. Move database access in gossip select code to less often called place.
This commit is contained in:
parent
004bdf1d3c
commit
79cb959991
2 changed files with 50 additions and 45 deletions
|
|
@ -821,18 +821,20 @@ void Creature::OnGossipSelect(Player* player, uint32 option)
|
|||
return;
|
||||
}
|
||||
|
||||
uint32 textid=GetGossipTextId( action, zoneid);
|
||||
if(textid==0)
|
||||
textid=GetNpcTextId();
|
||||
|
||||
switch (gossip->Action)
|
||||
{
|
||||
case GOSSIP_OPTION_GOSSIP:
|
||||
{
|
||||
uint32 textid = GetGossipTextId(action, zoneid);
|
||||
if (textid == 0)
|
||||
textid=GetNpcTextId();
|
||||
|
||||
player->PlayerTalkClass->CloseGossip();
|
||||
player->PlayerTalkClass->SendTalking( textid );
|
||||
player->PlayerTalkClass->SendTalking(textid);
|
||||
break;
|
||||
}
|
||||
case GOSSIP_OPTION_SPIRITHEALER:
|
||||
if( player->isDead() )
|
||||
if (player->isDead())
|
||||
CastSpell(this,17251,true,NULL,NULL,player->GetGUID());
|
||||
break;
|
||||
case GOSSIP_OPTION_QUESTGIVER:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue