public override void Deserialize( GenericReader gr ) { base.Deserialize( gr ); int version = gr.ReadInt(); owner = gr.ReadInt64(); bytes2 = (uint)gr.ReadInt(); bytes3 = (uint)gr.ReadInt(); }
public override void Deserialize( GenericReader gr ) { base.Deserialize( gr ); int version = gr.ReadInt(); if ( version > 6 ) { int nreput = gr.ReadInt(); for(int t = 0;t < nreput;t++ ) { int krep = gr.ReadInt(); int vrep = gr.ReadInt(); reputationAdjustments[ krep ] = vrep; } } if ( version > 5 ) { int nact = gr.ReadInt(); for(int t = 0;t < nact;t++ ) actionBar.Add( new Action( gr ) ); } if ( version > 4 ) { int nf = gr.ReadInt(); for(int t = 0;t < nf;t++ ) { UInt64 gu = (UInt64)gr.ReadInt64(); friends.Add( gu ); string user = gr.ReadString(); friends.Add( user ); } } if ( version > 2 ) { BindingPointX = gr.ReadFloat(); BindingPointY = gr.ReadFloat(); BindingPointZ = gr.ReadFloat(); BindingPointMapId = (UInt16)gr.ReadInt(); } if ( version > 1 ) { bool pa = gr.ReadBool(); if ( pa ) { petActions = new int[ 11 ]; for(int t = 0;t < 11;t++ ) petActions[ t ] = gr.ReadInt(); } } int sum = gr.ReadInt(); if ( sum != 0 ) { UInt64 g = gr.ReadInt64(); if ( version > 7 ) { int sid = gr.ReadInt(); Summon = new BaseCreature( gr ); Summon.Id = sid; } // Summon = (Mobile)MobileList.TempSummon[ g ]; Summon.SummonedBy = this; ( Summon as BaseCreature ).AIEngine = new SummonedAI( this, Summon as BaseCreature ); } sum = gr.ReadInt(); if ( sum != 0 ) { Charm = (Mobile)MobileList.TempSummon[ gr.ReadInt64() ]; Charm.CharmedBy = this; ( Charm as BaseCreature ).AIEngine = new SummonedAI( this, Charm as BaseCreature ); } CorpseLocationX = gr.ReadFloat(); CorpseLocationY = gr.ReadFloat(); CorpseLocationZ = gr.ReadFloat(); if ( version > 3 ) CorpseMapId = (ushort)gr.ReadShort(); corpsGuid = gr.ReadInt64(); zones = new uint[ 32 ]; for(int t = 0;t < 32;t++ ) zones[ t ] = (uint)gr.ReadInt(); int exi = gr.ReadInt(); if ( exi == 1 ) { mark = new Position( gr.ReadFloat(), gr.ReadFloat(), gr.ReadFloat(), gr.ReadInt() ); } ammoType = gr.ReadInt(); race = (Races)gr.ReadByte(); if ( version == 0 ) Classe = (Classes)gr.ReadByte(); gender = gr.ReadByte(); skin = gr.ReadByte(); face = gr.ReadByte(); hairStyle = gr.ReadByte(); hairColour = gr.ReadByte(); facialHair = gr.ReadByte(); copper = (uint)gr.ReadInt(); int nactq = 20; for(int t = 0;t < nactq;t++ ) { int vv = gr.ReadInt(); if ( vv == 1 ) { ActiveQuest aq = new ActiveQuest( gr ); if ( aq.Id > 0 ) AddQuest( aq ); } } int nq = gr.ReadInt(); for(int t = 0;t < nq;t++ ) { int id = gr.ReadInt(); questsDone[ id ] = true; } for(int g = 0;g < 8;g++ ) { int field = gr.ReadInt(); TaxiField[ g ] = (uint)field; } // RunSpeed = 11f; }
public override void Deserialize( GenericReader gr ) { base.Deserialize( gr ); int version = gr.ReadInt(); id = (int)gr.ReadInt(); if ( version > 0 ) { charge = (int)gr.ReadInt(); int rp = gr.ReadInt(); if ( rp == 1 ) { UInt64 g = gr.ReadInt64(); SpawnerLink = null;//(BaseSpawner)MobileList.TempSpawner[ g ]; } } }
public virtual void Deserialize( GenericReader gr ) { int version = gr.ReadInt(); guid = gr.ReadInt64(); X = gr.ReadFloat(); Y = gr.ReadFloat(); Z = gr.ReadFloat(); Orientation = gr.ReadFloat(); MapId = (UInt16)gr.ReadShort(); ZoneId = (int)gr.ReadInt(); /* int dec = gr.ReadInt(); if ( dec == 1 ) decay = DateTime.Now;*/ }
public override void Deserialize( GenericReader gr ) { int version = gr.ReadInt(); // id = gr.ReadInt(); UInt64 g = gr.ReadInt64(); SpawnerLink = null;//(BaseSpawner)MobileList.TempSpawner[ g ]; int esu = 0; int ech = 0; esu = gr.ReadInt(); ech = gr.ReadInt(); name = gr.ReadString(); if ( version > 0 ) classe = (Classes)gr.ReadInt(); talent = gr.ReadInt(); Level = gr.ReadInt(); model = gr.ReadInt(); exp = (uint)gr.ReadInt(); guildId = (uint)gr.ReadInt(); petLevel = (uint)gr.ReadInt(); petCreatureFamily = (uint)gr.ReadInt(); petDisplayId = (uint)gr.ReadInt(); speed = gr.ReadFloat(); size = gr.ReadFloat(); faction = (Factions)gr.ReadInt(); str = gr.ReadInt(); agility = gr.ReadInt(); stamina = gr.ReadInt(); iq = gr.ReadInt(); spirit = gr.ReadInt(); baseStr = gr.ReadFloat(); baseAgility = gr.ReadFloat(); baseStamina = gr.ReadFloat(); baseIq = gr.ReadFloat(); baseSpirit = gr.ReadFloat(); walkSpeed = gr.ReadFloat(); if ( walkSpeed == 0 ) walkSpeed = 4.7777f; runSpeed = gr.ReadFloat(); if ( runSpeed == 0 ) runSpeed = 7f; swimSpeed = gr.ReadFloat(); if ( swimSpeed == 0 ) swimSpeed = 4.72f; swimBackSpeed = gr.ReadFloat(); if ( swimBackSpeed == 0 ) swimBackSpeed = 2.5f; hitPoints = gr.ReadInt(); mana = gr.ReadInt(); energy = gr.ReadInt(); rage = gr.ReadInt(); focus = gr.ReadInt(); baseHitPoints = gr.ReadInt(); baseMana = gr.ReadInt(); baseEnergy = gr.ReadInt(); baseRage = gr.ReadInt(); baseFocus = gr.ReadInt(); block = gr.ReadInt(); armor = gr.ReadInt(); resistHoly = gr.ReadInt(); resistFire = gr.ReadInt(); resistNature = gr.ReadInt(); resistFrost = gr.ReadInt(); resistShadow = gr.ReadInt(); resistArcane = gr.ReadInt(); int nSkills = gr.ReadInt(); for(int t = 0;t < nSkills;t++ ) { ushort skill = (ushort)gr.ReadShort(); allSkills[ skill ] = Skill.Deserialize( gr, t ); } int nSpells = gr.ReadInt(); for(int t = 0;t < nSpells;t++ ) { ushort spell = (ushort)gr.ReadShort(); byte place = gr.ReadByte(); knownAbilities[ (int)spell ] = (int)place; /* if ( TalentDescription.IsTalent( (int)spell ) ) { if ( onInitialiseTalent[ (int)spell ] != null ) { ( onInitialiseTalent[ (int)spell ] as TalentHandlers.TalentHandler )( Abilities.abilities[ (int)spell ], this ); } // this.AddPermanentAura( Abilities.abilities[ (int)spell ], new Aura() ); // permanentAura.Add( spell ); }*/ } int nTalentList = gr.ReadInt(); for(int t = 0;t < nTalentList;t++ ) { int spell = gr.ReadInt(); int lev = gr.ReadInt(); talentList[ spell ] = (int)lev; } if ( gr.ReadInt() != 0 ) freeze = true; int nit = gr.ReadInt(); for(int t = 0;t < nit;t++ ) { int n = gr.ReadInt(); if ( n == 1 ) items[ t ] = Item.Load( gr ); else items[ t ] = null; } if ( gr.ReadInt() != 0 ) movementChange = true; manaType = gr.ReadInt(); professions = gr.ReadByte(); standState = (StandStates)gr.ReadInt(); base.Deserialize( gr ); moveVector = new MoveVector( this, X, Y, Z ); // if ( this is BaseSpawner ) // MobileList.TempSpawner[ Guid ] = this; if ( esu != 0 ) MobileList.TempSummon[ Guid ] = this; if ( ech != 0 ) MobileList.TempSummon[ Guid ] = this; //movementTimer = new MovementTimer( this ); }
void Deserialize( GenericReader gr, bool fake ) { int version = gr.ReadInt(); Guid = (UInt64)gr.ReadInt64(); maxCount = gr.ReadInt(); }
public virtual void Deserialize( GenericReader gr ) { int version = gr.ReadInt(); int n = gr.ReadInt(); guid = (UInt64)gr.ReadInt64(); longueur = 0; //Coord last = null; for(int t = 0;t < n;t++) { byte typ = gr.ReadByte(); if ( typ == 0 ) { float x = gr.ReadFloat(); float y = gr.ReadFloat(); float z = gr.ReadFloat(); int p1 = gr.ReadInt(); int p2 = gr.ReadInt(); int n1 = gr.ReadInt(); int n2 = gr.ReadInt(); Coord nc = new Coord( x, y, z, null, null ); allLinks.Add( nc ); allLinks.Add( p1 ); allLinks.Add( p2 ); allLinks.Add( n1 ); allLinks.Add( n2 ); Add( nc ); } else { float x = gr.ReadFloat(); float y = gr.ReadFloat(); float z = gr.ReadFloat(); int p1 = gr.ReadInt(); int p2 = gr.ReadInt(); int n1 = gr.ReadInt(); int n2 = gr.ReadInt(); Intersection ii = new Intersection( null, null, null, null, x, y, z ); allLinks.Add( ii ); allLinks.Add( p1 ); allLinks.Add( p2 ); allLinks.Add( n1 ); allLinks.Add( n2 ); p1 = gr.ReadInt(); p2 = gr.ReadInt(); n1 = gr.ReadInt(); n2 = gr.ReadInt(); allLinks.Add( p1 ); allLinks.Add( p2 ); allLinks.Add( n1 ); allLinks.Add( n2 ); Add( ii ); } } }