Target nearest enemy

Discussions on various DOL development features

Moderator: Support Team

Target nearest enemy

Postby flikmax » Wed Dec 07, 2011 9:54 am

Hello all, what classes in the source code handle the possibility to target the nearest enemy (by default keyboard's settings clicking on TAB key)??

Im asking it because i've some problem fixing the following issues:
1. When you charm a pet or you got a summoned pet, if you try to target the nearest enemy near you, the pet is targetted !
2. Same thing as above if a GuildMate or a GroupMember do the same action.


I'm wondering it may depend from the client but i don't find where..

Any idea?
flikmax
DOL Apprentice
 
Posts: 42
Joined: Sat Sep 27, 2003 4:41 pm
Location: Italy

Re: Target nearest enemy

Postby Blue » Wed Dec 07, 2011 10:51 am

That Tab key is client side. The client will send us a TargetChange. Maybe some wrong flags/realm are sent (enemy flag?).
ex DOL Lead Developer
Blue
Uthgard Admin
 
Posts: 961
Joined: Wed Jan 21, 2004 11:07 pm
ICQ: 63977313

Re: Target nearest enemy

Postby Dunnerholl » Wed Dec 07, 2011 11:48 am

I think the solution is to recreate the charmed mob and send the correct realm then, I have the impression that this is the Daoc way.
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm

Re: Target nearest enemy

Postby flikmax » Wed Dec 07, 2011 12:08 pm

i quote Blue for the 'tabbing' action but the reply to the client is server side, right?

the server is PvP, so it uses the PvPServerRules.cs and something about that is at line 491:
Code: Select all
public override byte GetColorHandling(GameClient client)
{
return 1;
}
That method looks like to ovveride the other one (virtual) in AbstractServerRules.cs at line 1573:
Code: Select all
public virtual byte GetColorHandling(GameClient client)
{
return 0;
}
Should it be possible to modify the value returned by the AbstractServerRules from 0 to 1 like the PvP one? Imho the overrides doesn't "override" well...

That flag (0, 1, etc..) is also inside PacketLib1xx.cs files but is commented and i dunno why:
Code: Select all
//if (GameServer.ServerRules.GetColorHandling(m_gameClient) == 1) // PvP
im confused..
flikmax
DOL Apprentice
 
Posts: 42
Joined: Sat Sep 27, 2003 4:41 pm
Location: Italy


Return to “%s” DOL Development Discussion

Who is online

Users browsing this forum: No registered users and 1 guest