Add function for SetObjectScale
Author: NoFantasy Source: Mangos
This commit is contained in:
@@ -299,7 +299,7 @@ public:
|
||||
for (itr = chained.begin(); itr != chained.end(); ++itr)
|
||||
{
|
||||
if (Player* charmed = Unit::GetPlayer(*me, (*itr).first))
|
||||
charmed->SetFloatValue(OBJECT_FIELD_SCALE_X, (*itr).second);
|
||||
charmed->SetObjectScale((*itr).second);
|
||||
}
|
||||
|
||||
chained.clear();
|
||||
@@ -347,7 +347,7 @@ public:
|
||||
for (itr = chained.begin(); itr != chained.end(); ++itr)
|
||||
{
|
||||
if (Player* player = Unit::GetPlayer(*me, (*itr).first))
|
||||
player->SetFloatValue(OBJECT_FIELD_SCALE_X, (*itr).second);
|
||||
player->SetObjectScale((*itr).second);
|
||||
}
|
||||
chained.clear();
|
||||
}
|
||||
@@ -512,7 +512,7 @@ public:
|
||||
DoCast(target, SPELL_CHAINS_OF_KELTHUZAD);
|
||||
float scale = target->GetFloatValue(OBJECT_FIELD_SCALE_X);
|
||||
chained.insert(std::make_pair(target->GetGUID(), scale));
|
||||
target->SetFloatValue(OBJECT_FIELD_SCALE_X, scale * 2);
|
||||
target->SetObjectScale(scale * 2);
|
||||
events.ScheduleEvent(EVENT_CHAINED_SPELL, 2000); //core has 2000ms to set unit flag charm
|
||||
}
|
||||
}
|
||||
@@ -530,7 +530,7 @@ public:
|
||||
{
|
||||
if (!player->isCharmed())
|
||||
{
|
||||
player->SetFloatValue(OBJECT_FIELD_SCALE_X, (*itr).second);
|
||||
player->SetObjectScale((*itr).second);
|
||||
std::map<uint64, float>::iterator next = itr;
|
||||
++next;
|
||||
chained.erase(itr);
|
||||
|
||||
Reference in New Issue
Block a user