Merge pull request #6605 from Vincent-Michael/scale
Core/Misc: Add SetObjectScale function
This commit is contained in:
@@ -89,7 +89,7 @@ bool Corpse::Create(uint32 guidlow, Player* owner)
|
|||||||
|
|
||||||
WorldObject::_Create(guidlow, HIGHGUID_CORPSE, owner->GetPhaseMask());
|
WorldObject::_Create(guidlow, HIGHGUID_CORPSE, owner->GetPhaseMask());
|
||||||
|
|
||||||
SetFloatValue(OBJECT_FIELD_SCALE_X, 1);
|
SetObjectScale(1);
|
||||||
SetUInt64Value(CORPSE_FIELD_OWNER, owner->GetGUID());
|
SetUInt64Value(CORPSE_FIELD_OWNER, owner->GetGUID());
|
||||||
|
|
||||||
_gridCoord = Trinity::ComputeGridCoord(GetPositionX(), GetPositionY());
|
_gridCoord = Trinity::ComputeGridCoord(GetPositionX(), GetPositionY());
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData* data
|
|||||||
SetSpeed(MOVE_SWIM, 1.0f); // using 1.0 rate
|
SetSpeed(MOVE_SWIM, 1.0f); // using 1.0 rate
|
||||||
SetSpeed(MOVE_FLIGHT, 1.0f); // using 1.0 rate
|
SetSpeed(MOVE_FLIGHT, 1.0f); // using 1.0 rate
|
||||||
|
|
||||||
SetFloatValue(OBJECT_FIELD_SCALE_X, cinfo->scale);
|
SetObjectScale(cinfo->scale);
|
||||||
|
|
||||||
SetFloatValue(UNIT_FIELD_HOVERHEIGHT, cinfo->HoverHeight);
|
SetFloatValue(UNIT_FIELD_HOVERHEIGHT, cinfo->HoverHeight);
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ bool DynamicObject::CreateDynamicObject(uint32 guidlow, Unit* caster, uint32 spe
|
|||||||
WorldObject::_Create(guidlow, HIGHGUID_DYNAMICOBJECT, caster->GetPhaseMask());
|
WorldObject::_Create(guidlow, HIGHGUID_DYNAMICOBJECT, caster->GetPhaseMask());
|
||||||
|
|
||||||
SetEntry(spellId);
|
SetEntry(spellId);
|
||||||
SetFloatValue(OBJECT_FIELD_SCALE_X, 1);
|
SetObjectScale(1);
|
||||||
SetUInt64Value(DYNAMICOBJECT_CASTER, caster->GetGUID());
|
SetUInt64Value(DYNAMICOBJECT_CASTER, caster->GetGUID());
|
||||||
|
|
||||||
// The lower word of DYNAMICOBJECT_BYTES must be 0x0001. This value means that the visual radius will be overriden
|
// The lower word of DYNAMICOBJECT_BYTES must be 0x0001. This value means that the visual radius will be overriden
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa
|
|||||||
|
|
||||||
UpdateRotationFields(rotation2, rotation3); // GAMEOBJECT_FACING, GAMEOBJECT_ROTATION, GAMEOBJECT_PARENTROTATION+2/3
|
UpdateRotationFields(rotation2, rotation3); // GAMEOBJECT_FACING, GAMEOBJECT_ROTATION, GAMEOBJECT_PARENTROTATION+2/3
|
||||||
|
|
||||||
SetFloatValue(OBJECT_FIELD_SCALE_X, goinfo->size);
|
SetObjectScale(goinfo->size);
|
||||||
|
|
||||||
SetUInt32Value(GAMEOBJECT_FACTION, goinfo->faction);
|
SetUInt32Value(GAMEOBJECT_FACTION, goinfo->faction);
|
||||||
SetUInt32Value(GAMEOBJECT_FLAGS, goinfo->flags);
|
SetUInt32Value(GAMEOBJECT_FLAGS, goinfo->flags);
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ bool Bag::Create(uint32 guidlow, uint32 itemid, Player const* owner)
|
|||||||
Object::_Create(guidlow, 0, HIGHGUID_CONTAINER);
|
Object::_Create(guidlow, 0, HIGHGUID_CONTAINER);
|
||||||
|
|
||||||
SetEntry(itemid);
|
SetEntry(itemid);
|
||||||
SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);
|
SetObjectScale(1.0f);
|
||||||
|
|
||||||
SetUInt64Value(ITEM_FIELD_OWNER, owner ? owner->GetGUID() : 0);
|
SetUInt64Value(ITEM_FIELD_OWNER, owner ? owner->GetGUID() : 0);
|
||||||
SetUInt64Value(ITEM_FIELD_CONTAINED, owner ? owner->GetGUID() : 0);
|
SetUInt64Value(ITEM_FIELD_CONTAINED, owner ? owner->GetGUID() : 0);
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ bool Item::Create(uint32 guidlow, uint32 itemid, Player const* owner)
|
|||||||
Object::_Create(guidlow, 0, HIGHGUID_ITEM);
|
Object::_Create(guidlow, 0, HIGHGUID_ITEM);
|
||||||
|
|
||||||
SetEntry(itemid);
|
SetEntry(itemid);
|
||||||
SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);
|
SetObjectScale(1.0f);
|
||||||
|
|
||||||
SetUInt64Value(ITEM_FIELD_OWNER, owner ? owner->GetGUID() : 0);
|
SetUInt64Value(ITEM_FIELD_OWNER, owner ? owner->GetGUID() : 0);
|
||||||
SetUInt64Value(ITEM_FIELD_CONTAINED, owner ? owner->GetGUID() : 0);
|
SetUInt64Value(ITEM_FIELD_CONTAINED, owner ? owner->GetGUID() : 0);
|
||||||
@@ -400,7 +400,7 @@ bool Item::LoadFromDB(uint32 guid, uint64 owner_guid, Field* fields, uint32 entr
|
|||||||
|
|
||||||
// Set entry, MUST be before proto check
|
// Set entry, MUST be before proto check
|
||||||
SetEntry(entry);
|
SetEntry(entry);
|
||||||
SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);
|
SetObjectScale(1.0f);
|
||||||
|
|
||||||
ItemTemplate const* proto = GetTemplate();
|
ItemTemplate const* proto = GetTemplate();
|
||||||
if (!proto)
|
if (!proto)
|
||||||
|
|||||||
@@ -137,6 +137,8 @@ class Object
|
|||||||
uint32 GetEntry() const { return GetUInt32Value(OBJECT_FIELD_ENTRY); }
|
uint32 GetEntry() const { return GetUInt32Value(OBJECT_FIELD_ENTRY); }
|
||||||
void SetEntry(uint32 entry) { SetUInt32Value(OBJECT_FIELD_ENTRY, entry); }
|
void SetEntry(uint32 entry) { SetUInt32Value(OBJECT_FIELD_ENTRY, entry); }
|
||||||
|
|
||||||
|
void SetObjectScale(float scale) { SetFloatValue(OBJECT_FIELD_SCALE_X, scale); }
|
||||||
|
|
||||||
TypeID GetTypeId() const { return m_objectTypeId; }
|
TypeID GetTypeId() const { return m_objectTypeId; }
|
||||||
bool isType(uint16 mask) const { return (mask & m_objectType); }
|
bool isType(uint16 mask) const { return (mask & m_objectType); }
|
||||||
|
|
||||||
|
|||||||
@@ -870,7 +870,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
|
|||||||
else
|
else
|
||||||
scale = cFamily->minScale + float(getLevel() - cFamily->minScaleLevel) / cFamily->maxScaleLevel * (cFamily->maxScale - cFamily->minScale);
|
scale = cFamily->minScale + float(getLevel() - cFamily->minScaleLevel) / cFamily->maxScaleLevel * (cFamily->maxScale - cFamily->minScale);
|
||||||
|
|
||||||
SetFloatValue(OBJECT_FIELD_SCALE_X, scale);
|
SetObjectScale(scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resistance
|
// Resistance
|
||||||
|
|||||||
@@ -3153,7 +3153,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
|
|||||||
SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f);
|
SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f);
|
||||||
|
|
||||||
// reset size before reapply auras
|
// reset size before reapply auras
|
||||||
SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);
|
SetObjectScale(1.0f);
|
||||||
|
|
||||||
// save base values (bonuses already included in stored stats
|
// save base values (bonuses already included in stored stats
|
||||||
for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i)
|
for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i)
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa
|
|||||||
|
|
||||||
m_goInfo = goinfo;
|
m_goInfo = goinfo;
|
||||||
|
|
||||||
SetFloatValue(OBJECT_FIELD_SCALE_X, goinfo->size);
|
SetObjectScale(goinfo->size);
|
||||||
|
|
||||||
SetUInt32Value(GAMEOBJECT_FACTION, goinfo->faction);
|
SetUInt32Value(GAMEOBJECT_FACTION, goinfo->faction);
|
||||||
SetUInt32Value(GAMEOBJECT_FLAGS, goinfo->flags);
|
SetUInt32Value(GAMEOBJECT_FLAGS, goinfo->flags);
|
||||||
|
|||||||
@@ -2425,7 +2425,7 @@ void AuraEffect::HandleAuraCloneCaster(AuraApplication const* aurApp, uint8 mode
|
|||||||
|
|
||||||
// What must be cloned? at least display and scale
|
// What must be cloned? at least display and scale
|
||||||
target->SetDisplayId(caster->GetDisplayId());
|
target->SetDisplayId(caster->GetDisplayId());
|
||||||
//target->SetFloatValue(OBJECT_FIELD_SCALE_X, caster->GetFloatValue(OBJECT_FIELD_SCALE_X)); // we need retail info about how scaling is handled (aura maybe?)
|
//target->SetObjectScale(caster->GetFloatValue(OBJECT_FIELD_SCALE_X)); // we need retail info about how scaling is handled (aura maybe?)
|
||||||
target->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_MIRROR_IMAGE);
|
target->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_MIRROR_IMAGE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -718,7 +718,7 @@ public:
|
|||||||
(ChatHandler(player)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
|
(ChatHandler(player)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
target->SetFloatValue(OBJECT_FIELD_SCALE_X, Scale);
|
target->SetObjectScale(Scale);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -949,7 +949,7 @@ public:
|
|||||||
if (target)
|
if (target)
|
||||||
{
|
{
|
||||||
wpCreature->SetDisplayId(target->GetDisplayId());
|
wpCreature->SetDisplayId(target->GetDisplayId());
|
||||||
wpCreature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f);
|
wpCreature->SetObjectScale(0.5f);
|
||||||
wpCreature->SetLevel(point > STRONG_MAX_LEVEL ? STRONG_MAX_LEVEL : point);
|
wpCreature->SetLevel(point > STRONG_MAX_LEVEL ? STRONG_MAX_LEVEL : point);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1003,7 +1003,7 @@ public:
|
|||||||
if (target)
|
if (target)
|
||||||
{
|
{
|
||||||
creature->SetDisplayId(target->GetDisplayId());
|
creature->SetDisplayId(target->GetDisplayId());
|
||||||
creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f);
|
creature->SetObjectScale(0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -1052,7 +1052,7 @@ public:
|
|||||||
if (target)
|
if (target)
|
||||||
{
|
{
|
||||||
creature->SetDisplayId(target->GetDisplayId());
|
creature->SetDisplayId(target->GetDisplayId());
|
||||||
creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f);
|
creature->SetObjectScale(0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ public:
|
|||||||
pAttumen->GetMotionMaster()->MoveChase(pAttumen->getVictim());
|
pAttumen->GetMotionMaster()->MoveChase(pAttumen->getVictim());
|
||||||
pAttumen->SetTarget(pAttumen->getVictim()->GetGUID());
|
pAttumen->SetTarget(pAttumen->getVictim()->GetGUID());
|
||||||
}
|
}
|
||||||
pAttumen->SetFloatValue(OBJECT_FIELD_SCALE_X, 1);
|
pAttumen->SetObjectScale(1);
|
||||||
}
|
}
|
||||||
} else Mount_Timer -= diff;
|
} else Mount_Timer -= diff;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ class boss_akilzon : public CreatureScript
|
|||||||
CloudGUID = Cloud->GetGUID();
|
CloudGUID = Cloud->GetGUID();
|
||||||
Cloud->SetUnitMovementFlags(MOVEMENTFLAG_DISABLE_GRAVITY);
|
Cloud->SetUnitMovementFlags(MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||||
Cloud->StopMoving();
|
Cloud->StopMoving();
|
||||||
Cloud->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);
|
Cloud->SetObjectScale(1.0f);
|
||||||
Cloud->setFaction(35);
|
Cloud->setFaction(35);
|
||||||
Cloud->SetMaxHealth(9999999);
|
Cloud->SetMaxHealth(9999999);
|
||||||
Cloud->SetHealth(9999999);
|
Cloud->SetHealth(9999999);
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ class boss_thekal : public CreatureScript
|
|||||||
if (Resurrect_Timer <= diff)
|
if (Resurrect_Timer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(me, SPELL_TIGER_FORM);
|
DoCast(me, SPELL_TIGER_FORM);
|
||||||
me->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.00f);
|
me->SetObjectScale(2.00f);
|
||||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
me->SetFullHealth();
|
me->SetFullHealth();
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ public:
|
|||||||
//! HACK: Creature's can't have MOVEMENTFLAG_FLYING
|
//! HACK: Creature's can't have MOVEMENTFLAG_FLYING
|
||||||
me->AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
|
me->AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
|
||||||
me->setFaction(16);
|
me->setFaction(16);
|
||||||
me->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);
|
me->SetObjectScale(1.0f);
|
||||||
DoCast(me, SPELL_FLAME_SPHERE_VISUAL);
|
DoCast(me, SPELL_FLAME_SPHERE_VISUAL);
|
||||||
DoCast(me, SPELL_FLAME_SPHERE_SPAWN_EFFECT);
|
DoCast(me, SPELL_FLAME_SPHERE_SPAWN_EFFECT);
|
||||||
DoCast(me, SPELL_FLAME_SPHERE_PERIODIC);
|
DoCast(me, SPELL_FLAME_SPHERE_PERIODIC);
|
||||||
|
|||||||
+1
-1
@@ -615,7 +615,7 @@ class mob_frost_sphere : public CreatureScript
|
|||||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid1);
|
me->SetDisplayId(me->GetCreatureTemplate()->Modelid1);
|
||||||
DoCast(SPELL_PERMAFROST_VISUAL);
|
DoCast(SPELL_PERMAFROST_VISUAL);
|
||||||
DoCast(SPELL_PERMAFROST);
|
DoCast(SPELL_PERMAFROST);
|
||||||
me->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.0f);
|
me->SetObjectScale(2.0f);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -439,7 +439,7 @@ class npc_fizzlebang_toc : public CreatureScript
|
|||||||
if (Unit* pTrigger = me->SummonCreature(NPC_TRIGGER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 4.69494f, TEMPSUMMON_MANUAL_DESPAWN))
|
if (Unit* pTrigger = me->SummonCreature(NPC_TRIGGER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 4.69494f, TEMPSUMMON_MANUAL_DESPAWN))
|
||||||
{
|
{
|
||||||
m_uiTriggerGUID = pTrigger->GetGUID();
|
m_uiTriggerGUID = pTrigger->GetGUID();
|
||||||
pTrigger->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.0f);
|
pTrigger->SetObjectScale(2.0f);
|
||||||
pTrigger->SetDisplayId(22862);
|
pTrigger->SetDisplayId(22862);
|
||||||
pTrigger->CastSpell(pTrigger, SPELL_WILFRED_PORTAL, false);
|
pTrigger->CastSpell(pTrigger, SPELL_WILFRED_PORTAL, false);
|
||||||
}
|
}
|
||||||
@@ -456,7 +456,7 @@ class npc_fizzlebang_toc : public CreatureScript
|
|||||||
if (Creature* pPortal = me->SummonCreature(NPC_WILFRED_PORTAL, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 4.71239f, TEMPSUMMON_MANUAL_DESPAWN))
|
if (Creature* pPortal = me->SummonCreature(NPC_WILFRED_PORTAL, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 4.71239f, TEMPSUMMON_MANUAL_DESPAWN))
|
||||||
{
|
{
|
||||||
pPortal->SetReactState(REACT_PASSIVE);
|
pPortal->SetReactState(REACT_PASSIVE);
|
||||||
pPortal->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.0f);
|
pPortal->SetObjectScale(2.0f);
|
||||||
pPortal->CastSpell(pPortal, SPELL_WILFRED_PORTAL, false);
|
pPortal->CastSpell(pPortal, SPELL_WILFRED_PORTAL, false);
|
||||||
m_uiPortalGUID = pPortal->GetGUID();
|
m_uiPortalGUID = pPortal->GetGUID();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ public:
|
|||||||
for (itr = chained.begin(); itr != chained.end(); ++itr)
|
for (itr = chained.begin(); itr != chained.end(); ++itr)
|
||||||
{
|
{
|
||||||
if (Player* charmed = Unit::GetPlayer(*me, (*itr).first))
|
if (Player* charmed = Unit::GetPlayer(*me, (*itr).first))
|
||||||
charmed->SetFloatValue(OBJECT_FIELD_SCALE_X, (*itr).second);
|
charmed->SetObjectScale((*itr).second);
|
||||||
}
|
}
|
||||||
|
|
||||||
chained.clear();
|
chained.clear();
|
||||||
@@ -347,7 +347,7 @@ public:
|
|||||||
for (itr = chained.begin(); itr != chained.end(); ++itr)
|
for (itr = chained.begin(); itr != chained.end(); ++itr)
|
||||||
{
|
{
|
||||||
if (Player* player = Unit::GetPlayer(*me, (*itr).first))
|
if (Player* player = Unit::GetPlayer(*me, (*itr).first))
|
||||||
player->SetFloatValue(OBJECT_FIELD_SCALE_X, (*itr).second);
|
player->SetObjectScale((*itr).second);
|
||||||
}
|
}
|
||||||
chained.clear();
|
chained.clear();
|
||||||
}
|
}
|
||||||
@@ -512,7 +512,7 @@ public:
|
|||||||
DoCast(target, SPELL_CHAINS_OF_KELTHUZAD);
|
DoCast(target, SPELL_CHAINS_OF_KELTHUZAD);
|
||||||
float scale = target->GetFloatValue(OBJECT_FIELD_SCALE_X);
|
float scale = target->GetFloatValue(OBJECT_FIELD_SCALE_X);
|
||||||
chained.insert(std::make_pair(target->GetGUID(), scale));
|
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
|
events.ScheduleEvent(EVENT_CHAINED_SPELL, 2000); //core has 2000ms to set unit flag charm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -530,7 +530,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (!player->isCharmed())
|
if (!player->isCharmed())
|
||||||
{
|
{
|
||||||
player->SetFloatValue(OBJECT_FIELD_SCALE_X, (*itr).second);
|
player->SetObjectScale((*itr).second);
|
||||||
std::map<uint64, float>::iterator next = itr;
|
std::map<uint64, float>::iterator next = itr;
|
||||||
++next;
|
++next;
|
||||||
chained.erase(itr);
|
chained.erase(itr);
|
||||||
|
|||||||
+1
-1
@@ -691,7 +691,7 @@ public:
|
|||||||
Creature* Cyclone = me->SummonCreature(CREATURE_CYCLONE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 15000);
|
Creature* Cyclone = me->SummonCreature(CREATURE_CYCLONE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||||
if (Cyclone)
|
if (Cyclone)
|
||||||
{
|
{
|
||||||
CAST_CRE(Cyclone)->SetFloatValue(OBJECT_FIELD_SCALE_X, 3.0f);
|
CAST_CRE(Cyclone)->SetObjectScale(3.0f);
|
||||||
Cyclone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
Cyclone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
Cyclone->setFaction(me->getFaction());
|
Cyclone->setFaction(me->getFaction());
|
||||||
Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_CYCLONE, true);
|
Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_CYCLONE, true);
|
||||||
|
|||||||
@@ -409,7 +409,7 @@ class boss_alar : public CreatureScript
|
|||||||
if (Summoned)
|
if (Summoned)
|
||||||
{
|
{
|
||||||
Summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
Summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
Summoned->SetFloatValue(OBJECT_FIELD_SCALE_X, Summoned->GetFloatValue(OBJECT_FIELD_SCALE_X)*2.5f);
|
Summoned->SetObjectScale(Summoned->GetFloatValue(OBJECT_FIELD_SCALE_X)*2.5f);
|
||||||
Summoned->SetDisplayId(11686);
|
Summoned->SetDisplayId(11686);
|
||||||
Summoned->setFaction(me->getFaction());
|
Summoned->setFaction(me->getFaction());
|
||||||
Summoned->SetLevel(me->getLevel());
|
Summoned->SetLevel(me->getLevel());
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ class boss_high_astromancer_solarian : public CreatureScript
|
|||||||
me->SetArmor(defaultarmor);
|
me->SetArmor(defaultarmor);
|
||||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
me->SetVisible(true);
|
me->SetVisible(true);
|
||||||
me->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize);
|
me->SetObjectScale(defaultsize);
|
||||||
me->SetDisplayId(MODEL_HUMAN);
|
me->SetDisplayId(MODEL_HUMAN);
|
||||||
|
|
||||||
Summons.DespawnAll();
|
Summons.DespawnAll();
|
||||||
@@ -153,7 +153,7 @@ class boss_high_astromancer_solarian : public CreatureScript
|
|||||||
|
|
||||||
void JustDied(Unit* /*killer*/)
|
void JustDied(Unit* /*killer*/)
|
||||||
{
|
{
|
||||||
me->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize);
|
me->SetObjectScale(defaultsize);
|
||||||
me->SetDisplayId(MODEL_HUMAN);
|
me->SetDisplayId(MODEL_HUMAN);
|
||||||
DoScriptText(SAY_DEATH, me);
|
DoScriptText(SAY_DEATH, me);
|
||||||
if (instance)
|
if (instance)
|
||||||
@@ -397,7 +397,7 @@ class boss_high_astromancer_solarian : public CreatureScript
|
|||||||
DoScriptText(SAY_VOIDB, me);
|
DoScriptText(SAY_VOIDB, me);
|
||||||
me->SetArmor(WV_ARMOR);
|
me->SetArmor(WV_ARMOR);
|
||||||
me->SetDisplayId(MODEL_VOIDWALKER);
|
me->SetDisplayId(MODEL_VOIDWALKER);
|
||||||
me->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize*2.5f);
|
me->SetObjectScale(defaultsize*2.5f);
|
||||||
}
|
}
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -774,7 +774,7 @@ class npc_simon_bunny : public CreatureScript
|
|||||||
colorSequence.clear();
|
colorSequence.clear();
|
||||||
playableSequence.clear();
|
playableSequence.clear();
|
||||||
playerSequence.clear();
|
playerSequence.clear();
|
||||||
me->SetFloatValue(OBJECT_FIELD_SCALE_X, large ? 2.0f : 1.0f);
|
me->SetObjectScale(large ? 2.0f : 1.0f);
|
||||||
|
|
||||||
std::list<WorldObject*> ClusterList;
|
std::list<WorldObject*> ClusterList;
|
||||||
Trinity::AllWorldObjectsInRange objects(me, searchDistance);
|
Trinity::AllWorldObjectsInRange objects(me, searchDistance);
|
||||||
|
|||||||
Reference in New Issue
Block a user