Ejemplo n.º 1
0
void SpellScript::SetHitDamage(int32 damage)
{
    if (!IsInTargetHook())
    {
        TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return;
    }
    m_spell->m_damage = damage;
}
Ejemplo n.º 2
0
int32 SpellScript::GetHitHeal()
{
    if (!IsInTargetHook())
    {
        sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return 0;
    }
    return m_spell->m_healing;
}
Ejemplo n.º 3
0
GameObject* SpellScript::GetHitGObj()
{
    if (!IsInTargetHook())
    {
        TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return NULL;
    }
    return m_spell->gameObjTarget;
}
Ejemplo n.º 4
0
void SpellScript::SetHitDamage(int32 damage)
{
    if (!IsInTargetHook())
    {
        sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return;
    }
    m_spell->m_damage = damage;
}
Ejemplo n.º 5
0
Item* SpellScript::GetHitItem()
{
    if (!IsInTargetHook())
    {
        sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return NULL;
    }
    return m_spell->itemTarget;
}
Ejemplo n.º 6
0
int32 SpellScript::GetHitDamage()
{
    if (!IsInTargetHook())
    {
        TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return 0;
    }
    return m_spell->m_damage;
}
Ejemplo n.º 7
0
void SpellScript::SetHitHeal(int32 heal)
{
    if (!IsInTargetHook())
    {
        TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return;
    }
    m_spell->m_healing = heal;
}
Ejemplo n.º 8
0
void SpellScript::SetHitHeal(int32 heal)
{
    if (!IsInTargetHook())
    {
        sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return;
    }
    m_spell->m_healing = heal;
}
Ejemplo n.º 9
0
Unit* SpellScript::GetHitUnit()
{
    if (!IsInTargetHook())
    {
        TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return NULL;
    }
    return m_spell->unitTarget;
}
Ejemplo n.º 10
0
int32 SpellScript::GetHitDamage()
{
    if (!IsInTargetHook())
    {
        sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return 0;
    }
    return m_spell->m_damage;
}
Ejemplo n.º 11
0
GameObject* SpellScript::GetHitGObj()
{
    if (!IsInTargetHook())
    {
        sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return NULL;
    }
    return m_spell->gameObjTarget;
}
Ejemplo n.º 12
0
void SpellScript::PreventHitAura()
{
    if (!IsInTargetHook())
    {
        sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return;
    }
    if (m_spell->m_spellAura)
        m_spell->m_spellAura->Remove();
}
Ejemplo n.º 13
0
void SpellScript::PreventHitAura()
{
    if (!IsInTargetHook())
    {
        TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return;
    }
    if (m_spell->m_spellAura)
        m_spell->m_spellAura->Remove();
}
Ejemplo n.º 14
0
Player* SpellScript::GetHitPlayer() const
{
    if (!IsInTargetHook())
    {
        TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return nullptr;
    }
    if (m_spell->unitTarget)
        return m_spell->unitTarget->ToPlayer();
    return nullptr;
}
Ejemplo n.º 15
0
Player* SpellScript::GetHitPlayer()
{
    if (!IsInTargetHook())
    {
        sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return NULL;
    }
    if (m_spell->unitTarget)
        return m_spell->unitTarget->ToPlayer();
    else
        return NULL;
}
Ejemplo n.º 16
0
Creature* SpellScript::GetHitCreature()
{
    if (!IsInTargetHook())
    {
        sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return NULL;
    }
    if (m_spell->unitTarget)
        return m_spell->unitTarget->ToCreature();
    else
        return NULL;
}
Ejemplo n.º 17
0
Creature* SpellScript::GetHitCreature()
{
    if (!IsInTargetHook())
    {
        TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return NULL;
    }
    if (m_spell->unitTarget)
        return m_spell->unitTarget->ToCreature();
    else
        return NULL;
}
Ejemplo n.º 18
0
Aura* SpellScript::GetHitAura()
{
    if (!IsInTargetHook())
    {
        sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return NULL;
    }
    if (!m_spell->m_spellAura)
        return NULL;
    if (m_spell->m_spellAura->IsRemoved())
        return NULL;
    return m_spell->m_spellAura;
}
Ejemplo n.º 19
0
Aura* SpellScript::GetHitAura() const
{
    if (!IsInTargetHook())
    {
        TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
        return nullptr;
    }
    if (!m_spell->m_spellAura)
        return nullptr;
    if (m_spell->m_spellAura->IsRemoved())
        return nullptr;
    return m_spell->m_spellAura;
}