[11435] Fixed IsPositiveEffect triggered spell case and some cleanups

Mostly found in time 400 update.
This commit is contained in:
VladimirMangos 2011-05-08 01:38:28 +04:00
parent 3f531024f7
commit 06ba42ccba
14 changed files with 15 additions and 27 deletions

View file

@ -3,7 +3,3 @@ ALTER TABLE db_version CHANGE COLUMN required_10749_01_mangos_mangos_string requ
DELETE FROM `spell_proc_event` WHERE `entry` IN (52437);
INSERT INTO spell_proc_event VALUES
(52437, 0x00, 4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0x00000000, 0.000000, 0.000000, 0);

View file

@ -2,4 +2,3 @@ ALTER TABLE db_version CHANGE COLUMN required_10945_01_mangos_mangos_string requ
DELETE FROM spell_proc_event WHERE entry IN (16257, 16277, 16278, 16279, 16280);
DELETE FROM spell_proc_event WHERE entry IN (12966, 12967, 12968, 12969, 12970);

View file

@ -6,4 +6,3 @@ INSERT INTO command (name, security, help) VALUES
('send mass items',3,'Syntax: .send mass items #racemask|$racename|alliance|horde|all "#subject" "#text" itemid1[:count1] itemid2[:count2] ... itemidN[:countN]\r\n\r\nSend a mail to players. Subject and mail text must be in "". If for itemid not provided related count values then expected 1, if count > max items in stack then items will be send in required amount stacks. All stacks amount in mail limited to 12.'),
('send mass mail',1,'Syntax: .send mass mail #racemask|$racename|alliance|horde|all "#subject" "#text"\r\n\r\nSend a mail to players. Subject and mail text must be in "".'),
('send mass money','3','Syntax: .send mass money #racemask|$racename|alliance|horde|all "#subject" "#text" #money\r\n\r\nSend mail with money to players. Subject and mail text must be in "".');

View file

@ -4,4 +4,3 @@ DELETE FROM command WHERE name IN ('send mass mail');
INSERT INTO command (name, security, help) VALUES
('send mass mail',3,'Syntax: .send mass mail #racemask|$racename|alliance|horde|all "#subject" "#text"\r\n\r\nSend a mail to players. Subject and mail text must be in "".');

View file

@ -4,4 +4,3 @@ DELETE FROM command WHERE name = 'gm setview';
INSERT INTO command (name, security, help) VALUES
('gm setview',1,'Syntax: .gm setview\r\n\r\nSet farsight view on selected unit. Select yourself to set view back.');

View file

@ -9,5 +9,3 @@ CREATE TABLE `pool_creature_template` (
PRIMARY KEY (`id`),
INDEX `pool_idx` (pool_entry)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

View file

@ -9,5 +9,3 @@ CREATE TABLE `pool_gameobject_template` (
PRIMARY KEY (`id`),
INDEX `pool_idx` (pool_entry)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

View file

@ -4,4 +4,3 @@ DELETE FROM command WHERE name = 'debug spellcoefs';
INSERT INTO command (name, security, help) VALUES
('debug spellcoefs',3,'Syntax: .debug spellcoefs #pellid\r\n\r\nShow default calculated and DB stored coefficients for direct/dot heal/damage.');

View file

@ -4,4 +4,3 @@ DELETE FROM command WHERE name = 'debug spellcoefs';
INSERT INTO command (name, security, help) VALUES
('debug spellcoefs',3,'Syntax: .debug spellcoefs #spellid\r\n\r\nShow default calculated and DB stored coefficients for direct/dot heal/damage.');

View file

@ -2185,12 +2185,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
break;
}
case SPELLFAMILY_MAGE:
{
// Fingers of Frost stacks set to max at apply
if (GetId() == 74396)
GetHolder()->SetAuraCharges(GetSpellProto()->StackAmount);
break;
}
case SPELLFAMILY_HUNTER:
{
switch(GetId())
@ -8257,6 +8252,7 @@ m_permanent(false), m_isRemovedOnShapeLost(true), m_deleted(false), m_in_use(0)
case 55166: // Tidal Force
case 58914: // Kill Command (pet part)
case 71564: // Deadly Precision
case 74396: // Fingers of Frost
m_stackAmount = m_spellProto->StackAmount;
break;
}

View file

@ -740,7 +740,7 @@ bool IsPositiveEffect(SpellEntry const *spellproto, SpellEffectIndex effIndex)
{
// if non-positive trigger cast targeted to positive target this main cast is non-positive
// this will place this spell auras as debuffs
if (IsPositiveTarget(spellTriggeredProto->EffectImplicitTargetA[effIndex], spellTriggeredProto->EffectImplicitTargetB[effIndex]) &&
if (IsPositiveTarget(spellTriggeredProto->EffectImplicitTargetA[i], spellTriggeredProto->EffectImplicitTargetB[i]) &&
!IsPositiveEffect(spellTriggeredProto, SpellEffectIndex(i)))
return false;
}

View file

@ -7174,12 +7174,17 @@ bool Unit::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex i
// Check for immune to application of harmful magical effects
AuraList const& immuneAuraApply = GetAurasByType(SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL);
for(AuraList::const_iterator iter = immuneAuraApply.begin(); iter != immuneAuraApply.end(); ++iter)
if (spellInfo->Dispel == DISPEL_MAGIC && // Magic debuff
((*iter)->GetModifier()->m_miscvalue & GetSpellSchoolMask(spellInfo)) && // Check school
if (!immuneAuraApply.empty() &&
spellInfo->Dispel == DISPEL_MAGIC && // Magic debuff)
!IsPositiveEffect(spellInfo, index)) // Harmful
{
// Check school
SpellSchoolMask schoolMask = GetSpellSchoolMask(spellInfo);
for(AuraList::const_iterator iter = immuneAuraApply.begin(); iter != immuneAuraApply.end(); ++iter)
if ((*iter)->GetModifier()->m_miscvalue & schoolMask)
return true;
}
}
return false;
}

View file

@ -1373,7 +1373,8 @@ void World::DetectDBCLang()
m_lang_confid = LOCALE_enUS;
}
ChrRacesEntry const* race = sChrRacesStore.LookupEntry(1);
ChrRacesEntry const* race = sChrRacesStore.LookupEntry(RACE_HUMAN);
MANGOS_ASSERT(race);
std::string availableLocalsStr;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11434"
#define REVISION_NR "11435"
#endif // __REVISION_NR_H__