View Single Post
  #770  
Old 09-29-2008, 11:23 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Well, I got a few more that might interest you;
Selos and bard speed spells should not work in dungeons either, what I did was make up some new 'spell ids';
-=-=-=-=-=
spdat.h around 482 add;
Code:
bool IsSowTypeSpell(int16 spell_id);    //Angelox
bool IsFeralPackSpell(int16 spell_id);  //Angelox
-=--=-=-=-=
spdat.cpp around 708 add;
Code:
bool IsFeralPackSpell(int16 spell_id) {  //Angelox, works in dungeons
	bool Result = false;

	// Feral Pack
	if(spell_id == 4058)
		Result = true;

	return Result;
}

bool IsSowTypeSpell(int16 spell_id) {  //Angelox
	bool Result = false;

// Sow Types		Sow		  WolfForm	  ShareGreatWolf	   GreaterWolfForm	  SharWolf		Bard		     Bard		 EagleSow	
	if((spell_id == 278) || (spell_id == 425) || (spell_id == 3579) || (spell_id == 426) || (spell_id == 428)|| (spell_id == 717) || (spell_id == 2605) || (spell_id == 2517))
		Result = true;

	return Result;
}
I wanted to keep some sow spells in dungeons, but others no. My idea is to get things looking natural, the only group wolf I have available is the Feral Pack In dungeons (it is an LDoN dungeon spell), Thought it was pretty cool to have while working in dungeons. I also have some code (will post later) that enables the Druid to only wolf itself (then Sow everone else), and not the whole group. As when we played on live, most players didn't care to get 'Wolfed' all the time.

Once the above code is added, I then went to botAI.cpp at line 751 'case SpellType_Buff:'
entry, I added these to lines with your levitate check;
Code:
	  (IsSowTypeSpell(AIspells[i].spellid) && !zone->CanCastOutdoor()) ||
	  (IsFeralPackSpell(AIspells[i].spellid) && zone->CanCastOutdoor())) { //Angelox
Now it looks like this;
Code:
	// Put the zone levitate check here since bots are able to bypass the client casting check
	 if(IsEffectInSpell(AIspells[i].spellid, SE_Levitate) && !zone->CanLevitate() ||
	  (IsSowTypeSpell(AIspells[i].spellid) && !zone->CanCastOutdoor()) ||
	  (IsFeralPackSpell(AIspells[i].spellid) && zone->CanCastOutdoor())) { //Angelox
	  break;
}
The outcome of this is, when playing outdoors, you look over to the wolf in the group, and think 'Yep, there's the Druid'(sort of a classic look to a Druid). And when in dungeon, you get the numerous benefits of Feral Pack, which players really liked to have.
The Druid should Wolf first, then Sow for this to work.
And I have disabled all wolf forms but the one 'self only' in npc_spells_entries .
Still if you don't like my Druid wolf idea, the other code works for blocking choice spells in and out of dungeons

One problem needs to be solved with Illusions is, you can't equip a Bot while under the effect. I usually have all the gear ready and quickly hand it over before the bot casts the illusion.