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
8563b88859
commit
f2852a95b7
3 changed files with 73 additions and 51 deletions
|
|
@ -818,18 +818,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