SVN Revision 3096

View and discuss the latests SVN commits, to ensure the best efficiency in our work.

Moderators: Support Team, Developer Team

SVN Revision 3096

Postby DOLBot » Fri May 25, 2012 2:09 am

Commit from matt450

Log Messages
Changed: Proc handling change, if item model is Bruiser (model 1671/2113), allow procs to fire on keep components and keep doors.

Files Changed:
MODIFY - DOLSharp/trunk/GameServer/gameobjects/GameLiving.cs

View Changes:
http://dolserver.svn.sourceforge.net/do ... v&rev=3096
User avatar
DOLBot
DOL Bot
 
Posts: 1933
Joined: Sat Jan 08, 2011 1:23 pm

Re: SVN Revision 3096

Postby Graveen » Fri May 25, 2012 6:57 am

I totally understand the quickfix, but it should not be done in this way, the model is a too generic base from a shard to another.

What i suggest:
- create a new blank class inheriting from GameInventoryItem (or ItemTemplate, w/e is suitable)
- perform this check in regard of this new class

/wave :)
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: SVN Revision 3096

Postby mattress » Fri May 25, 2012 2:36 pm

I thought about that briefly, kinda figured it was overkill to make a class for this specific item, so I went with the model, I'll change it and get it committed sometime today. I was going to use a check for the name Bruiser, but figured that wasn't very universal in terms of language since Bruiser might translate to something different in another language.
Matt450/Variations of "Matt"
User avatar
mattress
Server Team
 
Posts: 277
Joined: Mon Jul 05, 2010 3:30 am
Location: Oceanside, California

Re: SVN Revision 3096

Postby Graveen » Fri May 25, 2012 3:33 pm

With the class, you can also extend it to handle an effect, a specific sound, a complex trigger ( you hit with the sword of betrayal ? you are teleported to the Lord).

Another possible way is to rule it with a serverproperty, but this is a quick fix too - but more acceptable than an hardcoded one.
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: SVN Revision 3096

Postby mattress » Fri May 25, 2012 4:24 pm

Created the class, tested and committed, asterick pointed out to me that this will work for the Fools Bow also, I'll have to take a look at the proc on that one (if it has one).
Matt450/Variations of "Matt"
User avatar
mattress
Server Team
 
Posts: 277
Joined: Mon Jul 05, 2010 3:30 am
Location: Oceanside, California

Re: SVN Revision 3096

Postby mattress » Wed Jul 04, 2012 5:49 pm

Taking another look at this after a bit of a break....since the object class thing was a bit complicated, can we just use a flag in ItemTemplate, say, 10 (can't find any instances of this number being used anywhere else), to allow procs to fire on keepcomponents?
Code: Select all
public override bool AllowWeaponMagicalEffect(AttackData ad, InventoryItem weapon, Spell weaponSpell)
{
if (weapon.Flags == 10)
return true
else return false; // special code goes here
}
Matt450/Variations of "Matt"
User avatar
mattress
Server Team
 
Posts: 277
Joined: Mon Jul 05, 2010 3:30 am
Location: Oceanside, California

Re: SVN Revision 3096

Postby Graveen » Wed Jul 04, 2012 6:40 pm

it's better, but, what is the problem with a new class inheriting from itemtemplate ?
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: SVN Revision 3096

Postby mattress » Wed Jul 04, 2012 9:25 pm

The new class won't apply to artifacts, when the server starts up, ArtifactMgr references the Artifact and ArtifactXItem table and all the artifacts in players inventories become InventoryArtifact objects. The class on the Bruiser ItemTemplate was changed to DOL.GS.GameSiegeItem, but the class doesn't carry over when the server starts up.
Matt450/Variations of "Matt"
User avatar
mattress
Server Team
 
Posts: 277
Joined: Mon Jul 05, 2010 3:30 am
Location: Oceanside, California

Re: SVN Revision 3096

Postby Tolakram » Wed Jul 04, 2012 11:16 pm

I think flags are fine for now, with a comment about artifacts included. If or when artifacts are re-written to use the new items types then the code for these can change. Dealing with legacy crap here.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA


Return to “%s” DOL SVN Commits

Who is online

Users browsing this forum: No registered users and 1 guest