[accepted] StandardMobBrain.cs Shade Aggro Fix

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

[accepted] StandardMobBrain.cs Shade Aggro Fix

Postby LifeFlight » Mon Mar 09, 2009 5:00 am

Mob would not aggro a player in shade form because it was searching for the wrong effect: ShadeEffect instead of the correct NecromancerShadeEffect.

Patch:
http://lifeflight.utpdr.com/contribute/ ... rain.patch
LifeFlight's PvP.
LifeFlight
Contributor
 
Posts: 114
Joined: Wed Jan 03, 2007 6:07 am
Website: http://lifeflight.utpdr.com
Location: Texas

Re: StandardMobBrain.cs Shade Aggro Fix

Postby Dunnerholl » Mon Mar 09, 2009 6:58 am

Mob would not aggro a player in shade form because it was searching for the wrong effect: ShadeEffect instead of the correct NecromancerShadeEffect.

Patch:
http://lifeflight.utpdr.com/contribute/ ... rain.patch
without checking it - is ShadeEffect the stealtheffect? if so, u wouldnt want to aggro stealthed players. as i remember they are usually first uncovered and then aggroed
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm

Re: StandardMobBrain.cs Shade Aggro Fix

Postby LifeFlight » Mon Mar 09, 2009 7:12 am

Nah, ShadeEffect is what Shades of Mist and Traitors dagger use, Basically the method changes people morphs.

Also changes necros to their shade, which is honestly a bad way to code it, but its there.

So without this edit a player can use shades of mist and they won't get aggro.
LifeFlight's PvP.
LifeFlight
Contributor
 
Posts: 114
Joined: Wed Jan 03, 2007 6:07 am
Website: http://lifeflight.utpdr.com
Location: Texas

Re: StandardMobBrain.cs Shade Aggro Fix

Postby Dunnerholl » Mon Mar 09, 2009 7:17 am

Nah, ShadeEffect is what Shades of Mist and Traitors dagger use, Basically the method changes people morphs.

Also changes necros to their shade, which is honestly a bad way to code it, but its there.

So without this edit a player can use shades of mist and they won't get aggro.
ok perfect :)
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm

Re: StandardMobBrain.cs Shade Aggro Fix

Postby LifeFlight » Mon Mar 09, 2009 7:19 am

Hopefully I generated the patch file correctly, then it will be perfect.

Otherwise I fail.
LifeFlight's PvP.
LifeFlight
Contributor
 
Posts: 114
Joined: Wed Jan 03, 2007 6:07 am
Website: http://lifeflight.utpdr.com
Location: Texas

Re: StandardMobBrain.cs Shade Aggro Fix

Postby Graveen » Mon Mar 09, 2009 7:40 am

Accepted, soon in SVN, thank you

The patch totally correct. Remember once generated if you don't want to host it you can simply put it inline, it is human readable.
The svn system is built to automatically retrieve the #revision before applying the patch, so it is very safe.
Code: Select all
Index: StandardMobBrain.cs
===================================================================
--- StandardMobBrain.cs (revision 1563)
+++ StandardMobBrain.cs (working copy)
@@ -207,7 +207,7 @@
if (!GameServer.ServerRules.IsAllowedToAttack(Body, player, true)) continue;
// Don't aggro on immune players.

- if (player.EffectList.GetOfType(typeof(ShadeEffect)) != null)
+ if (player.EffectList.GetOfType(typeof(NecromancerShadeEffect)) != null)
continue;

int aggrolevel = 0;
/bow
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: [accepted] StandardMobBrain.cs Shade Aggro Fix

Postby LifeFlight » Mon Mar 09, 2009 7:47 am

is it better for you for it to be inline or in a file?
LifeFlight's PvP.
LifeFlight
Contributor
 
Posts: 114
Joined: Wed Jan 03, 2007 6:07 am
Website: http://lifeflight.utpdr.com
Location: Texas

Re: [accepted] StandardMobBrain.cs Shade Aggro Fix

Postby Graveen » Mon Mar 09, 2009 8:06 am

Putting it inline if possible (as patch are really light in general) allows us to discuss the change, that's all
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: StandardMobBrain.cs Shade Aggro Fix

Postby Aredhel » Fri Mar 13, 2009 3:48 pm

Nah, ShadeEffect is what Shades of Mist and Traitors dagger use, Basically the method changes people morphs.

Also changes necros to their shade, which is honestly a bad way to code it, but its there.

So without this edit a player can use shades of mist and they won't get aggro.
I specifically added NecromancerShadeEffect, the former necro implementation (which, btw, I trashed completely) used only the regular shade effect (and then tried to find out whether the shade was from a necro or the one from Traitor's), which was even worse.
User avatar
Aredhel
Inactive Staff Member
 
Posts: 1024
Joined: Sat Apr 14, 2007 1:49 pm
Location: Germany


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 0 guests