Some Creature* casts moved to new ToCreature.
Added const Creature* ToCreature() --HG-- branch : trunk
This commit is contained in:
@@ -53,7 +53,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode( WorldPacket & recv_data )
|
||||
case TYPEID_UNIT:
|
||||
{
|
||||
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for npc, guid = %u",uint32(GUID_LOPART(guid)) );
|
||||
Creature* cr_questgiver=(Creature*)questgiver;
|
||||
Creature* cr_questgiver=questgiver->ToCreature();
|
||||
if( !cr_questgiver->IsHostileTo(_player)) // not show quest status to enemies
|
||||
{
|
||||
questStatus = sScriptMgr.NPCDialogStatus(_player, cr_questgiver);
|
||||
@@ -188,7 +188,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode( WorldPacket & recv_data )
|
||||
switch(pObject->GetTypeId())
|
||||
{
|
||||
case TYPEID_UNIT:
|
||||
sScriptMgr.QuestAccept(_player, ((Creature*)pObject), qInfo );
|
||||
sScriptMgr.QuestAccept(_player, (pObject->ToCreature()), qInfo );
|
||||
break;
|
||||
case TYPEID_ITEM:
|
||||
case TYPEID_CONTAINER:
|
||||
@@ -297,7 +297,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode( WorldPacket & recv_data )
|
||||
switch(pObject->GetTypeId())
|
||||
{
|
||||
case TYPEID_UNIT:
|
||||
if( !(sScriptMgr.ChooseReward( _player, ((Creature*)pObject), pQuest, reward )) )
|
||||
if( !(sScriptMgr.ChooseReward( _player, (pObject->ToCreature()), pQuest, reward )) )
|
||||
{
|
||||
// Send next quest
|
||||
if(Quest const* nextquest = _player->GetNextQuest( guid ,pQuest ) )
|
||||
|
||||
Reference in New Issue
Block a user