mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 13:37:02 +00:00
[11497] Fixed another source of crash at accept quest from item.
OnQuestAccept script calls moved into Player::AddQuest before remove/replace quest starting item. Its still called only at quest accept ofc (questGiver object != NULL only in like case.
This commit is contained in:
parent
4b00269ccc
commit
d111d1a4b3
3 changed files with 48 additions and 42 deletions
|
|
@ -185,19 +185,6 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode( WorldPacket & recv_data )
|
|||
|
||||
_player->GetAchievementMgr().StartTimedAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST, quest);
|
||||
|
||||
switch(pObject->GetTypeId())
|
||||
{
|
||||
case TYPEID_UNIT:
|
||||
sScriptMgr.OnQuestAccept(_player, (Creature*)pObject, qInfo);
|
||||
break;
|
||||
case TYPEID_ITEM:
|
||||
case TYPEID_CONTAINER:
|
||||
sScriptMgr.OnQuestAccept(_player, (Item*)pObject, qInfo);
|
||||
break;
|
||||
case TYPEID_GAMEOBJECT:
|
||||
sScriptMgr.OnQuestAccept(_player, (GameObject*)pObject, qInfo);
|
||||
break;
|
||||
}
|
||||
_player->PlayerTalkClass->CloseGossip();
|
||||
|
||||
if( qInfo->GetSrcSpell() > 0 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue