Thread: Sow in Dungeons
View Single Post
  #17  
Old 09-29-2008, 11:51 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Here's a better idea to what I originally had in mind - All these code snipets I'm posted are already tested for a while now, I sort of wanted to make sure i wasn't 'blunder posting' first.

Since really we are talking about Shamans Sow in dungeons, Why not disable all speed movement spells in dungeons , then add extra run speed to choice mobs?

around Line 164 in MobAI.cpp replace this;
Code:
						if (
							(spells[AIspells[i].spellid].targettype == ST_Target || tar == this)
							&& tar->DontBuffMeBefore() < Timer::GetCurrentTime()
							&& !tar->IsImmuneToSpell(AIspells[i].spellid, this)
							&& tar->CanBuffStack(AIspells[i].spellid, GetLevel(), true) >= 0
							&& !(tar->IsPet() && tar->GetOwner()->IsClient() && this != tar)	//no buffing PC's pets, but they can buff themself
							) {
							AIDoSpellCast(i, tar, mana_cost, &tar->pDontBuffMeBefore);
							return true;
						}
With this;
Code:
						if (
							(spells[AIspells[i].spellid].targettype == ST_Target || tar == this)
							&& tar->DontBuffMeBefore() < Timer::GetCurrentTime()
							&& !tar->IsImmuneToSpell(AIspells[i].spellid, this)
							&& tar->CanBuffStack(AIspells[i].spellid, GetLevel(), true) >= 0
							&& !(tar->IsPet() && tar->GetOwner()->IsClient() && this != tar)	//no buffing PC's pets, but they can buff themself
						) {	
						if(IsEffectInSpell(AIspells[i].spellid, SE_Levitate) && !zone->CanLevitate() ||
						  IsEffectInSpell(AIspells[i].spellid, SE_MovementSpeed) && !zone->CanCastOutdoor()){ //Angelox
						break;
						}
							AIDoSpellCast(i, tar, mana_cost, &tar->pDontBuffMeBefore);
							return true;
						}
I included Levitate also.

I then went through the dungeons where I knew shamans could sow, and ran Querys like this one;
Code:
UPDATE npc_types SET runspeed='1.9' WHERE (ID>='65000' AND ID<='65999') and class='10'; ##GukTop Shamans
Reply With Quote