aboutsummaryrefslogtreecommitdiff
path: root/src/game/Level3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Level3.cpp')
-rw-r--r--src/game/Level3.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index e2bf6c3cfa3..71d789f1d80 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -5284,14 +5284,14 @@ bool ChatHandler::HandleResetTalentsCommand(const char * args)
if (!*args && creature && creature->isPet())
{
Unit *owner = creature->GetOwner();
- if(owner && owner->GetTypeId() == TYPEID_PLAYER && ((Pet *)creature)->IsPermanentPetFor((Player*)owner))
+ if(owner && owner->GetTypeId() == TYPEID_PLAYER && ((Pet *)creature)->IsPermanentPetFor(owner->ToPlayer()))
{
((Pet *)creature)->resetTalents(true);
- ((Player*)owner)->SendTalentsInfoData(true);
+ owner->ToPlayer()->SendTalentsInfoData(true);
- ChatHandler((Player*)owner).SendSysMessage(LANG_RESET_PET_TALENTS);
- if(!m_session || m_session->GetPlayer()!=((Player*)owner))
- PSendSysMessage(LANG_RESET_PET_TALENTS_ONLINE,GetNameLink((Player*)owner).c_str());
+ ChatHandler(owner->ToPlayer()).SendSysMessage(LANG_RESET_PET_TALENTS);
+ if(!m_session || m_session->GetPlayer()!=owner->ToPlayer())
+ PSendSysMessage(LANG_RESET_PET_TALENTS_ONLINE,GetNameLink(owner->ToPlayer()).c_str());
}
return true;
}