Scripts: Reorder file names in Commands/CMakeList file and cosmetic changes in all scripts

This commit is contained in:
Spp-
2011-06-30 14:24:56 +02:00
parent d12bb4a657
commit 6fd41ae50e
372 changed files with 1974 additions and 1968 deletions
+6 -6
View File
@@ -440,7 +440,7 @@ public:
}
else if (target->ToCreature()->isPet())
{
Unit *owner = target->GetOwner();
Unit* owner = target->GetOwner();
if (owner && owner->GetTypeId() == TYPEID_PLAYER && ((Pet *)target)->IsPermanentPetFor(owner->ToPlayer()))
{
// check online security
@@ -698,15 +698,15 @@ public:
return false;
}
if (target->GetTypeId()==TYPEID_PLAYER)
if (Player* plr = target->ToPlayer())
{
// check online security
if (handler->HasLowerSecurity((Player*)target, 0))
if (handler->HasLowerSecurity(plr, 0))
return false;
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink((Player*)target).c_str());
if (handler->needReportToTarget((Player*)target))
(ChatHandler((Player*)target)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink(plr).c_str());
if (handler->needReportToTarget(plr))
(ChatHandler(plr)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
}
target->SetFloatValue(OBJECT_FIELD_SCALE_X, Scale);