Merge pull request #31 from Ramusik/master
.modify scale on creatures, Combustion bug, Starfall supressing from root effects corrected, Dislodged Foreign Object no proc from heals, .learn all_myspells remove only player spells
This commit is contained in:
@@ -1363,7 +1363,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
}
|
||||
|
||||
//Any effect which causes you to lose control of your character will supress the starfall effect.
|
||||
if (m_caster->HasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_FLEEING | UNIT_STAT_ROOT | UNIT_STAT_CONFUSED))
|
||||
if (m_caster->HasUnitState(UNIT_STAT_CONTROLLED))
|
||||
return;
|
||||
|
||||
m_caster->CastSpell(unitTarget, damage, true);
|
||||
|
||||
@@ -148,9 +148,13 @@ public:
|
||||
return true;
|
||||
uint32 family = clsEntry->spellfamily;
|
||||
|
||||
for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i)
|
||||
for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); ++i)
|
||||
{
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(i);
|
||||
SkillLineAbilityEntry const *entry = sSkillLineAbilityStore.LookupEntry(i);
|
||||
if (!entry)
|
||||
continue;
|
||||
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(entry->spellId);
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
@@ -175,7 +179,7 @@ public:
|
||||
if (!SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer(), false))
|
||||
continue;
|
||||
|
||||
handler->GetSession()->GetPlayer()->learnSpell(i, false);
|
||||
handler->GetSession()->GetPlayer()->learnSpell(spellInfo->Id, false);
|
||||
}
|
||||
|
||||
handler->SendSysMessage(LANG_COMMAND_LEARN_CLASS_SPELLS);
|
||||
|
||||
@@ -676,35 +676,38 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
//Edit Player Scale
|
||||
//Edit Player or Creature Scale
|
||||
static bool HandleModifyScaleCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
float Scale = (float)atof((char*)args);
|
||||
if (Scale > 10.0f || Scale < 0.1f)
|
||||
if (Scale > 10.0f || Scale < 0.0f)
|
||||
{
|
||||
handler->SendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
Player* target = handler->getSelectedPlayer();
|
||||
Unit* target = handler->getSelectedUnit();
|
||||
if (!target)
|
||||
{
|
||||
handler->SendSysMessage(LANG_NO_CHAR_SELECTED);
|
||||
handler->SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
return false;
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink(target).c_str());
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
|
||||
|
||||
if (target->GetTypeId()==TYPEID_PLAYER)
|
||||
{
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity((Player*)target, 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);
|
||||
}
|
||||
|
||||
target->SetFloatValue(OBJECT_FIELD_SCALE_X, Scale);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user