Some albetros source's bug .. help me fixed?

03/07/2012 09:35 somecode#1
first:
when the player died , client's mouse is show the player still can attack。
Second:
when the player died , a monk use skill lock the ghost , but Client show he still can use the PathFinding
Third:
when the player use any skill .have some delay
Fourth:
some skill can't use...
03/07/2012 16:11 pro4never#2
1: Not sure, possible not all death flags were sent. Never noticed it though

2: Code soul shackle, I never guarenteed it was fully working.

3: Not sure, I didn't have delay on skills but could be the source lagging... again there's a number of things needing to be fixed in the source to make it properly efficient. Recoding the skill system was actually on my list of things to do at some point.

4: Not all skills are coded, code them and they will work.
03/08/2012 00:15 injection illusion logic#3
as pro said , update deathflags properly about soul lock simply try to add it as flag for the pathfinding , aka if(plapla.flags.soullock) break or return without executing the pathfinding

about the first problem u can simply make 2 methods of CanAttack , Can'tAttack
add to the first that u can attack monsters , pole if it's war and if u r not polekeeper , whatever works for it and for can'tattack add pole while not war , add if ghost it can't attack

here is an example

Code:
public static bool CanAttack(Game.Entity attacker, Game.Entity attacked, Database.SpellInformation spell, bool melee)
        {
            if (spell != null)
                if (spell.CanKill && attacker.EntityFlag == EntityFlag.Player && ServerBase.Constants.PKForbiddenMaps.Contains(attacker.Owner.Map.ID) && attacked.EntityFlag == EntityFlag.Player)
                    return false;
            if (attacker.EntityFlag == EntityFlag.Player)
                if (attacker.Owner.WatchingGroup != null)
                    return false;
            if (attacked == null)
                return false;
            if (attacked.Dead)
            {
                attacker.AttackPacket = null;
                return false;
            }
03/08/2012 15:32 somecode#4
Quote:
Originally Posted by injection illusion logic View Post
as pro said , update deathflags properly about soul lock simply try to add it as flag for the pathfinding , aka if(plapla.flags.soullock) break or return without executing the pathfinding

about the first problem u can simply make 2 methods of CanAttack , Can'tAttack
add to the first that u can attack monsters , pole if it's war and if u r not polekeeper , whatever works for it and for can'tattack add pole while not war , add if ghost it can't attack

here is an example

Code:
public static bool CanAttack(Game.Entity attacker, Game.Entity attacked, Database.SpellInformation spell, bool melee)
        {
            if (spell != null)
                if (spell.CanKill && attacker.EntityFlag == EntityFlag.Player && ServerBase.Constants.PKForbiddenMaps.Contains(attacker.Owner.Map.ID) && attacked.EntityFlag == EntityFlag.Player)
                    return false;
            if (attacker.EntityFlag == EntityFlag.Player)
                if (attacker.Owner.WatchingGroup != null)
                    return false;
            if (attacked == null)
                return false;
            if (attacked.Dead)
            {
                attacker.AttackPacket = null;
                return false;
            }
i said .. client show another player ..he can attack..

didn't said server can execute another player's attack

you take the wrong mean
03/08/2012 17:46 injection illusion logic#5
-.- it's the flags bro -.-
03/08/2012 20:58 somecode#6
Quote:
Originally Posted by injection illusion logic View Post
-.- it's the flags bro -.-
i add the flags ... like the code

PHP Code:

RemoveFlag1
(Effect1.Fly);
            
RemoveFlag1(Effect1.Riding);
            
RemoveFlag1(Effect1.StartXp);
            
RemoveFlag1(Effect1.Cyclone);
            
RemoveFlag1(Effect1.Superman);
            
RemoveFlag1(Effect1.FatalStrike);
            
RemoveFlag1(Effect1.BlueName);
            
RemoveFlag1(Effect1.Vortex);
            
RemoveFlag2(Effect2.AzureShield);
            
RemoveFlag2(Effect2.CaryingFlag);
            
RemoveFlag2(Effect2.Oblivion);
            
AttackPacket null;
            
KilledAt DateTime.Now;
            
AddFlag1(Effect1.Dead);
            
AddFlag1(Effect1.Ghost);
            
DelayedActions.RemoveAction(DelayedActionType.ToGhost);
            
DelayedActions.AddAction(DelayedActionType.ToGhost, new Action(() => ToGhost()), 2000);
            
XP 0;
            
Stamina 0