PDA

View Full Version : Calm,pacify shamless hack


valcree
05-13-2007, 09:25 AM
Looks like this line of spells has been overlooked when causing mobs to agro. Here's my shameless hack..

In spells.cpp modify the if block on line 2320 so it reads the following. I just exceptioned over the cleric/druid/enchanter spells that may not cause agro.

if (spelltar->IsAIControlled() && IsDetrimentalSpell(spell_id)
) {

if (!(spell_id==47 || spell_id==45 || spell_id==208 || spell_id==240 || spell_id==513 || spell_id==480
|| spell_id==501 || spell_id==192 || spell_id==193 || spell_id==194 || spell_id==301 || spell_id==1541 || spell_id==1714
|| spell_id==3197 || spell_id==5274 || spell_id==5506 || spell_id==250 || spell_id==3601 || spell_id==5347)){
int16 aggro_amount = CheckAggroAmount(spell_id);//*spelltar->CastToNPC()->AggroModifier();
mlog(SPELLS__CASTING, "Spell %d cast on %s generated %d hate", spell_id, spelltar->GetName(), aggro_amount);
spelltar->AddToHateList(this, aggro_amount);
}
}