[RESOLU] Problème de reconnexion en combat - minCastInterval

A

Anonymous

Invité
#1
Bonsoir à tous,

Je rencontre un problème avec les sorts qui ont un "minCastInterval" quand je me reco en combat.
Dans le déroulement standard du combat, je compte "manuellement" le nombre de tours de relance restants. Là ok.
Mais si je me reco en combat (en prévoyant la relance complète du bot) j'ai perdu mon décompte, et c'est normal.
Mais il y a forcément un message qui contient l'info, et je ne parviens pas à mettre le doigt dessus :(
Alors votre aide serait la bienvenue ^^

Atlantide

PS : Joyeuses fêtes et bonnes vacances à ceux qui sont concernés :)
 

4R7Y

Contributeur
Inscrit
6 Mars 2011
Messages
213
Reactions
0
#2
Re: Problème de reconnexion en combat - minCastInterval

J'essai de te sniffer sa :) j'edit si jamais je trouve
 
A

Anonymous

Invité
#3
Re: Problème de reconnexion en combat - minCastInterval

cool, c'est sympa :)
mais ça veut dire que tu as pu contourner le problème d'une autre façon ?

Atlantide
 

4R7Y

Contributeur
Inscrit
6 Mars 2011
Messages
213
Reactions
0
#4
Re: Problème de reconnexion en combat - minCastInterval

Code:
package com.ankamagames.dofus.network.messages.game.context.fight
{
    import __AS3__.vec.*;
    import com.ankamagames.dofus.network.types.game.context.fight.*;
    import com.ankamagames.jerakine.network.*;
    import flash.utils.*;

    public class GameFightResumeMessage extends GameFightSpectateMessage implements INetworkMessage
    {
        private var _isInitialized:Boolean = false;
        public var spellCooldowns:Vector.<GameFightSpellCooldown>;
        public var summonCount:uint = 0;
        public var bombCount:uint = 0;
        public static const protocolId:uint = 6067;

        public function GameFightResumeMessage()
        {
            this.spellCooldowns = new Vector.<GameFightSpellCooldown>;
            return;
        }// end function

        override public function get isInitialized() : Boolean
        {
            return super.isInitialized && this._isInitialized;
        }// end function

        override public function getMessageId() : uint
        {
            return 6067;
        }// end function

        public function initGameFightResumeMessage(param1:Vector.<FightDispellableEffectExtendedInformations> = null, param2:Vector.<GameActionMark> = null, param3:uint = 0, param4:Vector.<GameFightSpellCooldown> = null, param5:uint = 0, param6:uint = 0) : GameFightResumeMessage
        {
            super.initGameFightSpectateMessage(param1, param2, param3);
            this.spellCooldowns = param4;
            this.summonCount = param5;
            this.bombCount = param6;
            this._isInitialized = true;
            return this;
        }// end function

        override public function reset() : void
        {
            super.reset();
            this.spellCooldowns = new Vector.<GameFightSpellCooldown>;
            this.summonCount = 0;
            this.bombCount = 0;
            this._isInitialized = false;
            return;
        }// end function

        override public function pack(param1:IDataOutput) : void
        {
            var _loc_2:* = new ByteArray();
            this.serialize(_loc_2);
            writePacket(param1, this.getMessageId(), _loc_2);
            return;
        }// end function

        override public function unpack(param1:IDataInput, param2:uint) : void
        {
            this.deserialize(param1);
            return;
        }// end function

        override public function serialize(param1:IDataOutput) : void
        {
            this.serializeAs_GameFightResumeMessage(param1);
            return;
        }// end function

        public function serializeAs_GameFightResumeMessage(param1:IDataOutput) : void
        {
            super.serializeAs_GameFightSpectateMessage(param1);
            param1.writeShort(this.spellCooldowns.length);
            var _loc_2:uint = 0;
            while (_loc_2 < this.spellCooldowns.length)
            {
                
                (this.spellCooldowns[_loc_2] as GameFightSpellCooldown).serializeAs_GameFightSpellCooldown(param1);
                _loc_2 = _loc_2 + 1;
            }
            if (this.summonCount < 0)
            {
                throw new Error("Forbidden value (" + this.summonCount + ") on element summonCount.");
            }
            param1.writeByte(this.summonCount);
            if (this.bombCount < 0)
            {
                throw new Error("Forbidden value (" + this.bombCount + ") on element bombCount.");
            }
            param1.writeByte(this.bombCount);
            return;
        }// end function

        override public function deserialize(param1:IDataInput) : void
        {
            this.deserializeAs_GameFightResumeMessage(param1);
            return;
        }// end function

        public function deserializeAs_GameFightResumeMessage(param1:IDataInput) : void
        {
            var _loc_4:GameFightSpellCooldown = null;
            super.deserialize(param1);
            var _loc_2:* = param1.readUnsignedShort();
            var _loc_3:uint = 0;
            while (_loc_3 < _loc_2)
            {
                
                _loc_4 = new GameFightSpellCooldown();
                _loc_4.deserialize(param1);
                this.spellCooldowns.push(_loc_4);
                _loc_3 = _loc_3 + 1;
            }
            this.summonCount = param1.readByte();
            if (this.summonCount < 0)
            {
                throw new Error("Forbidden value (" + this.summonCount + ") on element of GameFightResumeMessage.summonCount.");
            }
            this.bombCount = param1.readByte();
            if (this.bombCount < 0)
            {
                throw new Error("Forbidden value (" + this.bombCount + ") on element of GameFightResumeMessage.bombCount.");
            }
            return;
        }// end function

    }
}

Voilà l'ami

Je suis galant, voilà le code pour l'inherits en prime
Code:
package com.ankamagames.dofus.network.messages.game.context.fight
{
    import __AS3__.vec.*;
    import com.ankamagames.dofus.network.*;
    import com.ankamagames.dofus.network.types.game.action.fight.*;
    import com.ankamagames.dofus.network.types.game.actions.fight.*;
    import com.ankamagames.jerakine.network.*;
    import flash.utils.*;

    public class GameFightSpectateMessage extends NetworkMessage implements INetworkMessage
    {
        private var _isInitialized:Boolean = false;
        public var effects:Vector.<FightDispellableEffectExtendedInformations>;
        public var marks:Vector.<GameActionMark>;
        public var gameTurn:uint = 0;
        public static const protocolId:uint = 6069;

        public function GameFightSpectateMessage()
        {
            this.effects = new Vector.<FightDispellableEffectExtendedInformations>;
            this.marks = new Vector.<GameActionMark>;
            return;
        }// end function

        override public function get isInitialized() : Boolean
        {
            return this._isInitialized;
        }// end function

        override public function getMessageId() : uint
        {
            return 6069;
        }// end function

        public function initGameFightSpectateMessage(param1:Vector.<FightDispellableEffectExtendedInformations> = null, param2:Vector.<GameActionMark> = null, param3:uint = 0) : GameFightSpectateMessage
        {
            this.effects = param1;
            this.marks = param2;
            this.gameTurn = param3;
            this._isInitialized = true;
            return this;
        }// end function

        override public function reset() : void
        {
            this.effects = new Vector.<FightDispellableEffectExtendedInformations>;
            this.marks = new Vector.<GameActionMark>;
            this.gameTurn = 0;
            this._isInitialized = false;
            return;
        }// end function

        override public function pack(param1:IDataOutput) : void
        {
            var _loc_2:* = new ByteArray();
            this.serialize(_loc_2);
            writePacket(param1, this.getMessageId(), _loc_2);
            return;
        }// end function

        override public function unpack(param1:IDataInput, param2:uint) : void
        {
            this.deserialize(param1);
            return;
        }// end function

        public function serialize(param1:IDataOutput) : void
        {
            this.serializeAs_GameFightSpectateMessage(param1);
            return;
        }// end function

        public function serializeAs_GameFightSpectateMessage(param1:IDataOutput) : void
        {
            param1.writeShort(this.effects.length);
            var _loc_2:uint = 0;
            while (_loc_2 < this.effects.length)
            {
                
                param1.writeShort((this.effects[_loc_2] as FightDispellableEffectExtendedInformations).getTypeId());
                (this.effects[_loc_2] as FightDispellableEffectExtendedInformations).serialize(param1);
                _loc_2 = _loc_2 + 1;
            }
            param1.writeShort(this.marks.length);
            var _loc_3:uint = 0;
            while (_loc_3 < this.marks.length)
            {
                
                (this.marks[_loc_3] as GameActionMark).serializeAs_GameActionMark(param1);
                _loc_3 = _loc_3 + 1;
            }
            if (this.gameTurn < 0)
            {
                throw new Error("Forbidden value (" + this.gameTurn + ") on element gameTurn.");
            }
            param1.writeShort(this.gameTurn);
            return;
        }// end function

        public function deserialize(param1:IDataInput) : void
        {
            this.deserializeAs_GameFightSpectateMessage(param1);
            return;
        }// end function

        public function deserializeAs_GameFightSpectateMessage(param1:IDataInput) : void
        {
            var _loc_6:uint = 0;
            var _loc_7:FightDispellableEffectExtendedInformations = null;
            var _loc_8:GameActionMark = null;
            var _loc_2:* = param1.readUnsignedShort();
            var _loc_3:uint = 0;
            while (_loc_3 < _loc_2)
            {
                
                _loc_6 = param1.readUnsignedShort();
                _loc_7 = ProtocolTypeManager.getInstance(FightDispellableEffectExtendedInformations, _loc_6);
                _loc_7.deserialize(param1);
                this.effects.push(_loc_7);
                _loc_3 = _loc_3 + 1;
            }
            var _loc_4:* = param1.readUnsignedShort();
            var _loc_5:uint = 0;
            while (_loc_5 < _loc_4)
            {
                
                _loc_8 = new GameActionMark();
                _loc_8.deserialize(param1);
                this.marks.push(_loc_8);
                _loc_5 = _loc_5 + 1;
            }
            this.gameTurn = param1.readShort();
            if (this.gameTurn < 0)
            {
                throw new Error("Forbidden value (" + this.gameTurn + ") on element of GameFightSpectateMessage.gameTurn.");
            }
            return;
        }// end function

    }
}
 
A

Anonymous

Invité
#5
Re: Problème de reconnexion en combat - minCastInterval

Génial, c'est exactement ça qu'il me fallait :
Code:
public var spellCooldowns:Vector.<GameFightSpellCooldown>;
en plus, je traitais déjà ce message, mais au temps où je l'avais implémenté, je ne savais pas encore l'utilité des colldowns.

Merci pour mon cadeau de Noël 4R7Y :)

Atlantide
 
Haut Bas