Remove unnecessary CastToNPC in PetCommands

This commit is contained in:
Michael Cook (mackal)
2017-05-04 19:42:13 -04:00
parent 84bcb3ac03
commit 15d81eee21
+8 -8
View File
@@ -10269,11 +10269,11 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
break; break;
if (mypet->IsNoCast()) { if (mypet->IsNoCast()) {
Message_StringID(MT_PetResponse, PET_CASTING); Message_StringID(MT_PetResponse, PET_CASTING);
mypet->CastToNPC()->SetNoCast(false); mypet->SetNoCast(false);
} }
else { else {
Message_StringID(MT_PetResponse, PET_NOT_CASTING); Message_StringID(MT_PetResponse, PET_NOT_CASTING);
mypet->CastToNPC()->SetNoCast(true); mypet->SetNoCast(true);
} }
} }
break; break;
@@ -10284,7 +10284,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
break; break;
if (!mypet->IsNoCast()) { if (!mypet->IsNoCast()) {
Message_StringID(MT_PetResponse, PET_NOT_CASTING); Message_StringID(MT_PetResponse, PET_NOT_CASTING);
mypet->CastToNPC()->SetNoCast(true); mypet->SetNoCast(true);
} }
} }
break; break;
@@ -10295,7 +10295,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
break; break;
if (mypet->IsNoCast()) { if (mypet->IsNoCast()) {
Message_StringID(MT_PetResponse, PET_CASTING); Message_StringID(MT_PetResponse, PET_CASTING);
mypet->CastToNPC()->SetNoCast(false); mypet->SetNoCast(false);
} }
} }
break; break;
@@ -10306,11 +10306,11 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
break; break;
if (mypet->IsFocused()) { if (mypet->IsFocused()) {
Message_StringID(MT_PetResponse, PET_NOT_FOCUSING); Message_StringID(MT_PetResponse, PET_NOT_FOCUSING);
mypet->CastToNPC()->SetFocused(false); mypet->SetFocused(false);
} }
else { else {
Message_StringID(MT_PetResponse, PET_NOW_FOCUSING); Message_StringID(MT_PetResponse, PET_NOW_FOCUSING);
mypet->CastToNPC()->SetFocused(true); mypet->SetFocused(true);
} }
} }
break; break;
@@ -10321,7 +10321,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
break; break;
if (!mypet->IsFocused()) { if (!mypet->IsFocused()) {
Message_StringID(MT_PetResponse, PET_NOW_FOCUSING); Message_StringID(MT_PetResponse, PET_NOW_FOCUSING);
mypet->CastToNPC()->SetFocused(true); mypet->SetFocused(true);
} }
} }
break; break;
@@ -10332,7 +10332,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
break; break;
if (mypet->IsFocused()) { if (mypet->IsFocused()) {
Message_StringID(MT_PetResponse, PET_NOT_FOCUSING); Message_StringID(MT_PetResponse, PET_NOT_FOCUSING);
mypet->CastToNPC()->SetFocused(false); mypet->SetFocused(false);
} }
} }
break; break;