mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	Merge branch 'ioncannon/quest_system' into Jorge/quest_system
This commit is contained in:
		| @@ -66,7 +66,7 @@ namespace Meteor.Map.actors.chara.ai.controllers | ||||
|                 { | ||||
|                     if(owner.aiContainer.GetTargetFind().CanTarget((Character) chara.target) && chara.target is BattleNpc && ((BattleNpc)chara.target).hateContainer.HasHateForTarget(chara)) | ||||
|                     { | ||||
|                         owner.Engage(chara.target.actorId); | ||||
|                         owner.Engage(chara.target.Id); | ||||
|                         owner.hateContainer.AddBaseHate((Character) chara.target); | ||||
|                         break; | ||||
|                     } | ||||
|   | ||||
| @@ -417,8 +417,8 @@ namespace Meteor.Map.actors.chara.ai.controllers | ||||
|             if (target != owner.target) | ||||
|             { | ||||
|                 owner.target = target; | ||||
|                 owner.currentLockedTarget = target?.actorId ?? Actor.INVALID_ACTORID; | ||||
|                 owner.currentTarget = target?.actorId ?? Actor.INVALID_ACTORID; | ||||
|                 owner.currentLockedTarget = target?.Id ?? Actor.INVALID_ACTORID; | ||||
|                 owner.currentTarget = target?.Id ?? Actor.INVALID_ACTORID; | ||||
|  | ||||
|                  foreach (var player in owner.CurrentArea.GetActorsAroundActor<Player>(owner, 50)) | ||||
|                     player.QueuePacket(owner.GetHateTypePacket(player)); | ||||
|   | ||||
| @@ -332,7 +332,7 @@ namespace Meteor.Map.actors.chara.ai | ||||
|         { | ||||
|             if (!(owner is BattleNpc)) | ||||
|             { | ||||
|                 Program.Log.Error($"TargetFind.AddAllInHateList() owner [{owner.actorId}] {owner.customDisplayName} {owner.actorName} is not a BattleNpc"); | ||||
|                 Program.Log.Error($"TargetFind.AddAllInHateList() owner [{owner.Id}] {owner.DisplayName} {owner.Name} is not a BattleNpc"); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|   | ||||
| @@ -40,7 +40,7 @@ namespace Meteor.Map.actors.chara.ai.state | ||||
|  | ||||
|             this.target = (skill.mainTarget & ValidTarget.SelfOnly) != 0 ? owner : target; | ||||
|  | ||||
|             errorResult = new CommandResult(owner.actorId, 32553, 0); | ||||
|             errorResult = new CommandResult(owner.Id, 32553, 0); | ||||
|             if (returnCode == 0) | ||||
|             { | ||||
|                 OnStart(); | ||||
| @@ -59,7 +59,7 @@ namespace Meteor.Map.actors.chara.ai.state | ||||
|             if (returnCode != 0) | ||||
|             { | ||||
|                 interrupt = true; | ||||
|                 errorResult = new CommandResult(owner.actorId, (ushort)(returnCode == -1 ? 32558 : returnCode), 0); | ||||
|                 errorResult = new CommandResult(owner.Id, (ushort)(returnCode == -1 ? 32558 : returnCode), 0); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
| @@ -76,7 +76,7 @@ namespace Meteor.Map.actors.chara.ai.state | ||||
|                     owner.GetSubState().chantId = 0xf0; | ||||
|                     owner.SubstateModified(); | ||||
|                     //You ready [skill] (6F000002: BLM, 6F000003: WHM, 0x6F000008: BRD) | ||||
|                     owner.DoBattleAction(skill.id, (uint)0x6F000000 | skill.castType, new CommandResult(target.actorId, 30126, 1, 0, 1)); | ||||
|                     owner.DoBattleAction(skill.id, (uint)0x6F000000 | skill.castType, new CommandResult(target.Id, 30126, 1, 0, 1)); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|   | ||||
| @@ -49,7 +49,7 @@ namespace Meteor.Map.actors.chara.ai.state | ||||
|  | ||||
|         public override bool Update(DateTime tick) | ||||
|         { | ||||
|             if ((target == null || owner.target != target || owner.target?.actorId != owner.currentLockedTarget) && owner.isAutoAttackEnabled) | ||||
|             if ((target == null || owner.target != target || owner.target?.Id != owner.currentLockedTarget) && owner.isAutoAttackEnabled) | ||||
|                 owner.aiContainer.ChangeTarget(target = owner.CurrentArea.FindActorInArea<Character>(owner.currentTarget)); | ||||
|  | ||||
|             if (target == null || target.IsDead()) | ||||
|   | ||||
| @@ -47,7 +47,7 @@ namespace Meteor.Map.actors.chara.ai.state | ||||
|  | ||||
|             this.target = (spell.mainTarget & ValidTarget.SelfOnly) != 0 ? owner : target; | ||||
|  | ||||
|             errorResult = new CommandResult(owner.actorId, 32553, 0); | ||||
|             errorResult = new CommandResult(owner.Id, 32553, 0); | ||||
|             if (returnCode == 0 && owner.CanUse(this.target, spell, errorResult)) | ||||
|             { | ||||
|                 OnStart(); | ||||
| @@ -65,7 +65,7 @@ namespace Meteor.Map.actors.chara.ai.state | ||||
|             if (returnCode != 0) | ||||
|             { | ||||
|                 interrupt = true; | ||||
|                 errorResult = new CommandResult(target.actorId, (ushort)(returnCode == -1 ? 32553 : returnCode), 0, 0, 0, 1); | ||||
|                 errorResult = new CommandResult(target.Id, (ushort)(returnCode == -1 ? 32553 : returnCode), 0, 0, 0, 1); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
| @@ -98,7 +98,7 @@ namespace Meteor.Map.actors.chara.ai.state | ||||
|                     } | ||||
|                     owner.GetSubState().chantId = 0xf0; | ||||
|                     owner.SubstateModified(); | ||||
|                     owner.DoBattleAction(spell.id, (uint) 0x6F000000 | spell.castType, new CommandResult(target.actorId, 30128, 1, 0, 1)); //You begin casting (6F000002: BLM, 6F000003: WHM, 0x6F000008: BRD) | ||||
|                     owner.DoBattleAction(spell.id, (uint) 0x6F000000 | spell.castType, new CommandResult(target.Id, 30128, 1, 0, 1)); //You begin casting (6F000002: BLM, 6F000003: WHM, 0x6F000008: BRD) | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| @@ -174,7 +174,7 @@ namespace Meteor.Map.actors.chara.ai.state | ||||
|  | ||||
|             if (HasMoved()) | ||||
|             { | ||||
|                 errorResult = new CommandResult(owner.actorId, 30211, 0); | ||||
|                 errorResult = new CommandResult(owner.Id, 30211, 0); | ||||
|                 errorResult.animation = 0x7F000002; | ||||
|                 interrupt = true; | ||||
|                 return; | ||||
|   | ||||
| @@ -41,7 +41,7 @@ namespace Meteor.Map.actors.chara.ai.state | ||||
|  | ||||
|             this.target = (skill.mainTarget & ValidTarget.SelfOnly) != 0 ? owner : target; | ||||
|  | ||||
|             errorResult = new CommandResult(owner.actorId, 32553, 0); | ||||
|             errorResult = new CommandResult(owner.Id, 32553, 0); | ||||
|             if (returnCode == 0 && owner.CanUse(this.target, skill, errorResult)) | ||||
|             { | ||||
|                 OnStart(); | ||||
| @@ -60,7 +60,7 @@ namespace Meteor.Map.actors.chara.ai.state | ||||
|             if (returnCode != 0) | ||||
|             { | ||||
|                 interrupt = true; | ||||
|                 errorResult = new CommandResult(owner.actorId, (ushort)(returnCode == -1 ? 32558 : returnCode), 0); | ||||
|                 errorResult = new CommandResult(owner.Id, (ushort)(returnCode == -1 ? 32558 : returnCode), 0); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
| @@ -106,7 +106,7 @@ namespace Meteor.Map.actors.chara.ai.state | ||||
|                         owner.GetSubState().chantId = 0xf0; | ||||
|                         owner.SubstateModified(); | ||||
|                         //You ready [skill] (6F000002: BLM, 6F000003: WHM, 0x6F000008: BRD) | ||||
|                         owner.DoBattleAction(skill.id, (uint)0x6F000000 | skill.castType, new CommandResult(target.actorId, 30126, 1, 0, 1)); | ||||
|                         owner.DoBattleAction(skill.id, (uint)0x6F000000 | skill.castType, new CommandResult(target.Id, 30126, 1, 0, 1)); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|   | ||||
| @@ -97,7 +97,7 @@ namespace Meteor.Map.actors.chara.ai | ||||
|             { | ||||
|                 //Unsure why 10105 is the textId used | ||||
|                 //Also unsure why magicshield is used | ||||
|                 CommandResult action = new CommandResult(owner.actorId, 10105, (uint)(HitEffect.MagicEffectType | HitEffect.MagicShield | HitEffect.NoResist), dotTick); | ||||
|                 CommandResult action = new CommandResult(owner.Id, 10105, (uint)(HitEffect.MagicEffectType | HitEffect.MagicShield | HitEffect.NoResist), dotTick); | ||||
|                 utils.BattleUtils.HandleStoneskin(owner, action); | ||||
|                 // todo: figure out how to make red numbers appear for enemies getting hurt by dots | ||||
|                 resultContainer.AddAction(action); | ||||
| @@ -202,7 +202,7 @@ namespace Meteor.Map.actors.chara.ai | ||||
|                 if (newEffect != null && !newEffect.GetSilentOnGain()) | ||||
|                 { | ||||
|                     if (actionContainer != null) | ||||
|                         actionContainer.AddAction(new CommandResult(owner.actorId, worldmasterTextId, newEffect.GetStatusEffectId() | (uint)HitEffect.StatusEffectType)); | ||||
|                         actionContainer.AddAction(new CommandResult(owner.Id, worldmasterTextId, newEffect.GetStatusEffectId() | (uint)HitEffect.StatusEffectType)); | ||||
|                 } | ||||
|  | ||||
|                 // wont send a message about losing effect here | ||||
| @@ -254,7 +254,7 @@ namespace Meteor.Map.actors.chara.ai | ||||
|                 { | ||||
|                     //Only send a message if we're using an actioncontainer and the effect normally sends a message when it's lost | ||||
|                     if (actionContainer != null) | ||||
|                         actionContainer.AddAction(new CommandResult(owner.actorId, worldmasterTextId, effect.GetStatusEffectId() | (playEffect ? 0 : (uint)HitEffect.StatusLossType))); | ||||
|                         actionContainer.AddAction(new CommandResult(owner.Id, worldmasterTextId, effect.GetStatusEffectId() | (playEffect ? 0 : (uint)HitEffect.StatusLossType))); | ||||
|                 } | ||||
|  | ||||
|                 //hidden effects not in charawork | ||||
| @@ -382,7 +382,7 @@ namespace Meteor.Map.actors.chara.ai | ||||
|         { | ||||
|             owner.charaWork.status[index] = statusId; | ||||
|  | ||||
|             statusSubpackets.Add(SetActorStatusPacket.BuildPacket(owner.actorId, (ushort)index, statusId)); | ||||
|             statusSubpackets.Add(SetActorStatusPacket.BuildPacket(owner.Id, (ushort)index, statusId)); | ||||
|             owner.updateFlags |= ActorUpdateFlags.Status; | ||||
|         } | ||||
|  | ||||
| @@ -439,7 +439,7 @@ namespace Meteor.Map.actors.chara.ai | ||||
|             SetStatusAtIndex(index, (ushort) (newEffectId - 200000)); | ||||
|             SetTimeAtIndex(index, time); | ||||
|  | ||||
|             return new CommandResult(owner.actorId, 30330, (uint) HitEffect.StatusEffectType | newEffectId); | ||||
|             return new CommandResult(owner.Id, 30330, (uint) HitEffect.StatusEffectType | newEffectId); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -513,7 +513,7 @@ namespace Meteor.Map.actors.chara.ai.utils | ||||
|             if (skill != null && skill.numHits > 1) | ||||
|             { | ||||
|                 if (action.hitNum == 1) | ||||
|                     actionContainer?.AddAction(new CommandResult(attacker.actorId, 30441, 0)); | ||||
|                     actionContainer?.AddAction(new CommandResult(attacker.Id, 30441, 0)); | ||||
|  | ||||
|                 textIds = MultiHitTypeTextIds; | ||||
|             } | ||||
| @@ -717,7 +717,7 @@ namespace Meteor.Map.actors.chara.ai.utils | ||||
|                     { | ||||
|                         //If we need an extra action to show the status text | ||||
|                         if (isAdditional) | ||||
|                             results.AddAction(target.actorId, effect.GetStatusGainTextId(), skill.statusId | (uint) HitEffect.StatusEffectType); | ||||
|                             results.AddAction(target.Id, effect.GetStatusGainTextId(), skill.statusId | (uint) HitEffect.StatusEffectType); | ||||
|                     } | ||||
|                     else | ||||
|                         action.worldMasterTextId = 32002;//Is this right? | ||||
| @@ -729,7 +729,7 @@ namespace Meteor.Map.actors.chara.ai.utils | ||||
|                     { | ||||
|                         //If we need an extra action to show the status text | ||||
|                         if (isAdditional) | ||||
|                             results.AddAction(target.actorId, 30328, skill.statusId | (uint) HitEffect.StatusEffectType); | ||||
|                             results.AddAction(target.Id, 30328, skill.statusId | (uint) HitEffect.StatusEffectType); | ||||
|                     } | ||||
|                     else | ||||
|                         action.worldMasterTextId = 32002;//Is this right? | ||||
| @@ -905,7 +905,7 @@ namespace Meteor.Map.actors.chara.ai.utils | ||||
|                 { | ||||
|                     expChainNumber = effect.GetTier(); | ||||
|                     timeLimit = (uint)(GetChainTimeLimit(expChainNumber)); | ||||
|                     actionContainer?.AddEXPAction(new CommandResult(attacker.actorId, 33919, 0, expChainNumber, (byte)timeLimit)); | ||||
|                     actionContainer?.AddEXPAction(new CommandResult(attacker.Id, 33919, 0, expChainNumber, (byte)timeLimit)); | ||||
|                 } | ||||
|  | ||||
|                 totalBonus += GetChainBonus(expChainNumber); | ||||
|   | ||||
| @@ -181,27 +181,27 @@ namespace Meteor.Map.Actors | ||||
|         public SubPacket CreateAppearancePacket() | ||||
|         { | ||||
|             SetActorAppearancePacket setappearance = new SetActorAppearancePacket(modelId, appearanceIds); | ||||
|             return setappearance.BuildPacket(actorId); | ||||
|             return setappearance.BuildPacket(Id); | ||||
|         } | ||||
|  | ||||
|         public SubPacket CreateInitStatusPacket() | ||||
|         { | ||||
|             return (SetActorStatusAllPacket.BuildPacket(actorId, charaWork.status)); | ||||
|             return (SetActorStatusAllPacket.BuildPacket(Id, charaWork.status)); | ||||
|         } | ||||
|  | ||||
|         public SubPacket CreateSetActorIconPacket() | ||||
|         { | ||||
|             return SetActorIconPacket.BuildPacket(actorId, currentActorIcon); | ||||
|             return SetActorIconPacket.BuildPacket(Id, currentActorIcon); | ||||
|         } | ||||
|  | ||||
|         public SubPacket CreateSubStatePacket() | ||||
|         { | ||||
|             return SetActorSubStatePacket.BuildPacket(actorId, currentSubState); | ||||
|             return SetActorSubStatePacket.BuildPacket(Id, currentSubState); | ||||
|         } | ||||
|  | ||||
|         public void SetQuestGraphic(Player player, int graphicNum) | ||||
|         { | ||||
|             player.QueuePacket(SetActorQuestGraphicPacket.BuildPacket(actorId, graphicNum)); | ||||
|             player.QueuePacket(SetActorQuestGraphicPacket.BuildPacket(Id, graphicNum)); | ||||
|         } | ||||
|  | ||||
|         public void SetCurrentContentGroup(ContentGroup group) | ||||
| @@ -240,20 +240,20 @@ namespace Meteor.Map.Actors | ||||
|             if (onlySelf) | ||||
|             { | ||||
|                 if (this is Player) | ||||
|                     ((Player)this).QueuePacket(PlayAnimationOnActorPacket.BuildPacket(actorId, animId)); | ||||
|                     ((Player)this).QueuePacket(PlayAnimationOnActorPacket.BuildPacket(Id, animId)); | ||||
|             } | ||||
|             else | ||||
|                 CurrentArea.BroadcastPacketAroundActor(this, PlayAnimationOnActorPacket.BuildPacket(actorId, animId)); | ||||
|                 CurrentArea.BroadcastPacketAroundActor(this, PlayAnimationOnActorPacket.BuildPacket(Id, animId)); | ||||
|         } | ||||
|          | ||||
|         public void DoBattleAction(ushort commandId, uint animationId) | ||||
|         { | ||||
|             CurrentArea.BroadcastPacketAroundActor(this, CommandResultX00Packet.BuildPacket(actorId, animationId, commandId)); | ||||
|             CurrentArea.BroadcastPacketAroundActor(this, CommandResultX00Packet.BuildPacket(Id, animationId, commandId)); | ||||
|         } | ||||
|  | ||||
|         public void DoBattleAction(ushort commandId, uint animationId, CommandResult result) | ||||
|         { | ||||
|             CurrentArea.BroadcastPacketAroundActor(this, CommandResultX01Packet.BuildPacket(actorId, animationId, commandId, result)); | ||||
|             CurrentArea.BroadcastPacketAroundActor(this, CommandResultX01Packet.BuildPacket(Id, animationId, commandId, result)); | ||||
|         } | ||||
|  | ||||
|         public void DoBattleAction(ushort commandId, uint animationId, CommandResult[] results) | ||||
| @@ -263,12 +263,12 @@ namespace Meteor.Map.Actors | ||||
|             while (true) | ||||
|             { | ||||
|                 if (results.Length - currentIndex >= 10) | ||||
|                     CurrentArea.BroadcastPacketAroundActor(this, CommandResultX18Packet.BuildPacket(actorId, animationId, commandId, results, ref currentIndex)); | ||||
|                     CurrentArea.BroadcastPacketAroundActor(this, CommandResultX18Packet.BuildPacket(Id, animationId, commandId, results, ref currentIndex)); | ||||
|                 else if (results.Length - currentIndex > 1) | ||||
|                     CurrentArea.BroadcastPacketAroundActor(this, CommandResultX10Packet.BuildPacket(actorId, animationId, commandId, results, ref currentIndex)); | ||||
|                     CurrentArea.BroadcastPacketAroundActor(this, CommandResultX10Packet.BuildPacket(Id, animationId, commandId, results, ref currentIndex)); | ||||
|                 else if (results.Length - currentIndex == 1) | ||||
|                 { | ||||
|                     CurrentArea.BroadcastPacketAroundActor(this, CommandResultX01Packet.BuildPacket(actorId, animationId, commandId, results[currentIndex])); | ||||
|                     CurrentArea.BroadcastPacketAroundActor(this, CommandResultX01Packet.BuildPacket(Id, animationId, commandId, results[currentIndex])); | ||||
|                     currentIndex++; | ||||
|                 } | ||||
|                 else | ||||
| @@ -283,12 +283,12 @@ namespace Meteor.Map.Actors | ||||
|             while (true) | ||||
|             { | ||||
|                 if (results.Count - currentIndex >= 10) | ||||
|                     CurrentArea.BroadcastPacketAroundActor(this, CommandResultX18Packet.BuildPacket(actorId, animationId, commandId, results, ref currentIndex)); | ||||
|                     CurrentArea.BroadcastPacketAroundActor(this, CommandResultX18Packet.BuildPacket(Id, animationId, commandId, results, ref currentIndex)); | ||||
|                 else if (results.Count - currentIndex > 1) | ||||
|                     CurrentArea.BroadcastPacketAroundActor(this, CommandResultX10Packet.BuildPacket(actorId, animationId, commandId, results, ref currentIndex)); | ||||
|                     CurrentArea.BroadcastPacketAroundActor(this, CommandResultX10Packet.BuildPacket(Id, animationId, commandId, results, ref currentIndex)); | ||||
|                 else if (results.Count - currentIndex == 1) | ||||
|                 { | ||||
|                     CurrentArea.BroadcastPacketAroundActor(this, CommandResultX01Packet.BuildPacket(actorId, animationId, commandId, results[currentIndex])); | ||||
|                     CurrentArea.BroadcastPacketAroundActor(this, CommandResultX01Packet.BuildPacket(Id, animationId, commandId, results[currentIndex])); | ||||
|                     currentIndex++; | ||||
|                 } | ||||
|                 else | ||||
| @@ -405,14 +405,14 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|                 if ((updateFlags & ActorUpdateFlags.Appearance) != 0) | ||||
|                 { | ||||
|                     packets.Add(new SetActorAppearancePacket(modelId, appearanceIds).BuildPacket(actorId)); | ||||
|                     packets.Add(new SetActorAppearancePacket(modelId, appearanceIds).BuildPacket(Id)); | ||||
|                 } | ||||
|  | ||||
|                 if ((updateFlags & ActorUpdateFlags.State) != 0) | ||||
|                 { | ||||
|                     packets.Add(SetActorStatePacket.BuildPacket(actorId, currentMainState, 0x0)); | ||||
|                     packets.Add(CommandResultX00Packet.BuildPacket(actorId, 0x72000062, 0)); | ||||
|                     packets.Add(CommandResultX01Packet.BuildPacket(actorId, 0x7C000062, 21001, new CommandResult(actorId, 0, 1))); | ||||
|                     packets.Add(SetActorStatePacket.BuildPacket(Id, currentMainState, 0x0)); | ||||
|                     packets.Add(CommandResultX00Packet.BuildPacket(Id, 0x72000062, 0)); | ||||
|                     packets.Add(CommandResultX01Packet.BuildPacket(Id, 0x7C000062, 21001, new CommandResult(Id, 0, 1))); | ||||
|  | ||||
|                     updateFlags &= ~ActorUpdateFlags.State; | ||||
|                     //DoBattleAction(21001, 0x7C000062, new BattleAction(this.actorId, 0, 1, 0, 0, 1)); //Attack Mode | ||||
| @@ -420,7 +420,7 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|                 if ((updateFlags & ActorUpdateFlags.SubState) != 0) | ||||
|                 { | ||||
|                     packets.Add(SetActorSubStatePacket.BuildPacket(actorId, currentSubState)); | ||||
|                     packets.Add(SetActorSubStatePacket.BuildPacket(Id, currentSubState)); | ||||
|                     //packets.Add(CommandResultX00Packet.BuildPacket(actorId, 0x72000062, 0)); | ||||
|                     //packets.Add(CommandResultX01Packet.BuildPacket(actorId, 0x7C000062, 21001, new CommandResult(actorId, 0, 1))); | ||||
|  | ||||
| @@ -1126,7 +1126,7 @@ namespace Meteor.Map.Actors | ||||
|                     ushort totalDamage = 0; | ||||
|                     for (int hitNum = 1; hitNum <= command.numHits; hitNum++) | ||||
|                     { | ||||
|                         var action = new CommandResult(chara.actorId, command, (byte)GetHitDirection(chara), (byte) hitNum); | ||||
|                         var action = new CommandResult(chara.Id, command, (byte)GetHitDirection(chara), (byte) hitNum); | ||||
|                          | ||||
|                         //uncached script | ||||
|                         lua.LuaEngine.CallLuaBattleCommandFunction(this, command, folder, "onSkillFinish", this, chara, command, action, actions); | ||||
| @@ -1145,7 +1145,7 @@ namespace Meteor.Map.Actors | ||||
|                         //30442: [hitCount]fold Attack! [chara] takes a total of totalDamage points of damage. | ||||
|                         //30450: All attacks miss! | ||||
|                         ushort textId = (ushort) (hitTarget ? 30442 : 30450); | ||||
|                         actions.AddAction(new CommandResult(chara.actorId, textId, 0, totalDamage, (byte)hitCount)); | ||||
|                         actions.AddAction(new CommandResult(chara.Id, textId, 0, totalDamage, (byte)hitCount)); | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
| @@ -1153,7 +1153,7 @@ namespace Meteor.Map.Actors | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 actions.AddAction(new CommandResult(actorId, 30202, 0)); | ||||
|                 actions.AddAction(new CommandResult(Id, 30202, 0)); | ||||
|             } | ||||
|  | ||||
|             DelMP(command.CalculateMpCost(this)); | ||||
| @@ -1188,9 +1188,9 @@ namespace Meteor.Map.Actors | ||||
|             if (!itemPackages.ContainsKey((ushort)id)) | ||||
|                 return; | ||||
|  | ||||
|             player.QueuePacket(InventoryBeginChangePacket.BuildPacket(actorId, true)); | ||||
|             player.QueuePacket(InventoryBeginChangePacket.BuildPacket(Id, true)); | ||||
|             itemPackages[(ushort)id].SendFullPackage(player); | ||||
|             player.QueuePacket(InventoryEndChangePacket.BuildPacket(actorId)); | ||||
|             player.QueuePacket(InventoryEndChangePacket.BuildPacket(Id)); | ||||
|         } | ||||
|  | ||||
|         public void AddItem(uint catalogID) | ||||
| @@ -1297,7 +1297,7 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|         public InventoryItem GetItem(LuaUtils.ItemRefParam reference) | ||||
|         { | ||||
|             if (reference.actorId != actorId) | ||||
|             if (reference.actorId != Id) | ||||
|                 return null; | ||||
|             if (itemPackages.ContainsKey(reference.itemPackage)) | ||||
|             { | ||||
|   | ||||
| @@ -196,9 +196,9 @@ namespace Meteor.Map.actors.chara.player | ||||
|  | ||||
|             if (owner is Player) | ||||
|             { | ||||
|                 (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); | ||||
|                 (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.Id)); | ||||
|                 SendUpdate(); | ||||
|                 (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); | ||||
|                 (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.Id)); | ||||
|             } | ||||
|  | ||||
|             return ERROR_SUCCESS; | ||||
| @@ -273,9 +273,9 @@ namespace Meteor.Map.actors.chara.player | ||||
|  | ||||
|             if (owner is Player) | ||||
|             { | ||||
|                 (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); | ||||
|                 (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.Id)); | ||||
|                 SendUpdate(); | ||||
|                 (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); | ||||
|                 (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.Id)); | ||||
|             } | ||||
|  | ||||
|             return ERROR_SUCCESS; | ||||
| @@ -306,9 +306,9 @@ namespace Meteor.Map.actors.chara.player | ||||
|  | ||||
|             if (owner is Player) | ||||
|             { | ||||
|                 (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); | ||||
|                 (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.Id)); | ||||
|                 SendUpdate(); | ||||
|                 (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); | ||||
|                 (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.Id)); | ||||
|             } | ||||
|  | ||||
|             return ERROR_SUCCESS;            | ||||
| @@ -399,9 +399,9 @@ namespace Meteor.Map.actors.chara.player | ||||
|  | ||||
|             if (owner is Player) | ||||
|             { | ||||
|                 (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); | ||||
|                 (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.Id)); | ||||
|                 SendUpdate(); | ||||
|                 (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); | ||||
|                 (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.Id)); | ||||
|             } | ||||
|         } | ||||
|  | ||||
| @@ -450,9 +450,9 @@ namespace Meteor.Map.actors.chara.player | ||||
|  | ||||
|             if (owner is Player) | ||||
|             { | ||||
|                 (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); | ||||
|                 (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.Id)); | ||||
|                 SendUpdate(); | ||||
|                 (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); | ||||
|                 (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.Id)); | ||||
|             } | ||||
|         } | ||||
|  | ||||
| @@ -471,9 +471,9 @@ namespace Meteor.Map.actors.chara.player | ||||
|  | ||||
|             if (owner is Player) | ||||
|             { | ||||
|                 (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); | ||||
|                 (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.Id)); | ||||
|                 SendUpdate(); | ||||
|                 (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); | ||||
|                 (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.Id)); | ||||
|             } | ||||
|         } | ||||
|  | ||||
| @@ -501,9 +501,9 @@ namespace Meteor.Map.actors.chara.player | ||||
|  | ||||
|                 if (owner is Player) | ||||
|                 { | ||||
|                     (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); | ||||
|                     (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.Id)); | ||||
|                     SendUpdate(); | ||||
|                     (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); | ||||
|                     (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.Id)); | ||||
|                 } | ||||
|             }                    | ||||
|         } | ||||
| @@ -520,9 +520,9 @@ namespace Meteor.Map.actors.chara.player | ||||
|  | ||||
|             if (owner is Player) | ||||
|             { | ||||
|                 (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); | ||||
|                 (owner as Player).QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.Id)); | ||||
|                 SendUpdate(); | ||||
|                 (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); | ||||
|                 (owner as Player).QueuePacket(InventoryEndChangePacket.BuildPacket(owner.Id)); | ||||
|             } | ||||
|         } | ||||
|  | ||||
| @@ -606,9 +606,9 @@ namespace Meteor.Map.actors.chara.player | ||||
|         #region Packet Functions | ||||
|         public void SendFullPackage(Player player) | ||||
|         { | ||||
|             player.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, itemPackageCapacity, itemPackageCode)); | ||||
|             player.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.Id, itemPackageCapacity, itemPackageCode)); | ||||
|             SendItemPackets(player, 0); | ||||
|             player.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId));             | ||||
|             player.QueuePacket(InventorySetEndPacket.BuildPacket(owner.Id));             | ||||
|         } | ||||
|  | ||||
|         public void SendUpdate() | ||||
| @@ -641,12 +641,12 @@ namespace Meteor.Map.actors.chara.player | ||||
|             if (!holdingUpdates) | ||||
|                 Array.Clear(isDirty, 0, isDirty.Length); | ||||
|              | ||||
|             player.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, itemPackageCapacity, itemPackageCode)); | ||||
|             player.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.Id, itemPackageCapacity, itemPackageCode)); | ||||
|             //Send Updated Slots | ||||
|             SendItemPackets(player, items); | ||||
|             //Send Remove packets for tail end | ||||
|             SendItemPackets(player, slotsToRemove); | ||||
|             player.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); | ||||
|             player.QueuePacket(InventorySetEndPacket.BuildPacket(owner.Id)); | ||||
|             //If player is updating their normal inventory, we need to send | ||||
|             //an equip update as well to resync the slots. | ||||
|             if (player.Equals(owner) && itemPackageCode == NORMAL) | ||||
| @@ -655,7 +655,7 @@ namespace Meteor.Map.actors.chara.player | ||||
|  | ||||
|         private void SendItemPackets(Player player, InventoryItem item) | ||||
|         { | ||||
|              player.QueuePacket(InventoryListX01Packet.BuildPacket(owner.actorId, item));             | ||||
|              player.QueuePacket(InventoryListX01Packet.BuildPacket(owner.Id, item));             | ||||
|         } | ||||
|  | ||||
|         private void SendItemPackets(Player player, List<InventoryItem> items) | ||||
| @@ -665,16 +665,16 @@ namespace Meteor.Map.actors.chara.player | ||||
|             while (true) | ||||
|             { | ||||
|                 if (items.Count - currentIndex >= 64) | ||||
|                     player.QueuePacket(InventoryListX64Packet.BuildPacket(owner.actorId, items, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryListX64Packet.BuildPacket(owner.Id, items, ref currentIndex)); | ||||
|                 else if (items.Count - currentIndex >= 32) | ||||
|                     player.QueuePacket(InventoryListX32Packet.BuildPacket(owner.actorId, items, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryListX32Packet.BuildPacket(owner.Id, items, ref currentIndex)); | ||||
|                 else if (items.Count - currentIndex >= 16) | ||||
|                     player.QueuePacket(InventoryListX16Packet.BuildPacket(owner.actorId, items, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryListX16Packet.BuildPacket(owner.Id, items, ref currentIndex)); | ||||
|                 else if (items.Count - currentIndex > 1) | ||||
|                     player.QueuePacket(InventoryListX08Packet.BuildPacket(owner.actorId, items, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryListX08Packet.BuildPacket(owner.Id, items, ref currentIndex)); | ||||
|                 else if (items.Count - currentIndex == 1) | ||||
|                 { | ||||
|                     player.QueuePacket(InventoryListX01Packet.BuildPacket(owner.actorId, items[currentIndex])); | ||||
|                     player.QueuePacket(InventoryListX01Packet.BuildPacket(owner.Id, items[currentIndex])); | ||||
|                     currentIndex++; | ||||
|                 } | ||||
|                 else | ||||
| @@ -693,16 +693,16 @@ namespace Meteor.Map.actors.chara.player | ||||
|             while (true) | ||||
|             { | ||||
|                 if (endOfListIndex - currentIndex >= 64) | ||||
|                     player.QueuePacket(InventoryListX64Packet.BuildPacket(owner.actorId, lst, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryListX64Packet.BuildPacket(owner.Id, lst, ref currentIndex)); | ||||
|                 else if (endOfListIndex - currentIndex >= 32) | ||||
|                     player.QueuePacket(InventoryListX32Packet.BuildPacket(owner.actorId, lst, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryListX32Packet.BuildPacket(owner.Id, lst, ref currentIndex)); | ||||
|                 else if (endOfListIndex - currentIndex >= 16) | ||||
|                     player.QueuePacket(InventoryListX16Packet.BuildPacket(owner.actorId, lst, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryListX16Packet.BuildPacket(owner.Id, lst, ref currentIndex)); | ||||
|                 else if (endOfListIndex - currentIndex > 1) | ||||
|                     player.QueuePacket(InventoryListX08Packet.BuildPacket(owner.actorId, lst, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryListX08Packet.BuildPacket(owner.Id, lst, ref currentIndex)); | ||||
|                 else if (endOfListIndex - currentIndex == 1) | ||||
|                 { | ||||
|                     player.QueuePacket(InventoryListX01Packet.BuildPacket(owner.actorId, list[currentIndex])); | ||||
|                     player.QueuePacket(InventoryListX01Packet.BuildPacket(owner.Id, list[currentIndex])); | ||||
|                     currentIndex++; | ||||
|                 } | ||||
|                 else | ||||
| @@ -712,7 +712,7 @@ namespace Meteor.Map.actors.chara.player | ||||
|  | ||||
|         private void SendItemPackets(Player player, ushort index) | ||||
|         { | ||||
|             player.QueuePacket(InventoryRemoveX01Packet.BuildPacket(owner.actorId, index)); | ||||
|             player.QueuePacket(InventoryRemoveX01Packet.BuildPacket(owner.Id, index)); | ||||
|         } | ||||
|  | ||||
|         private void SendItemPackets(Player player, List<ushort> indexes) | ||||
| @@ -722,16 +722,16 @@ namespace Meteor.Map.actors.chara.player | ||||
|             while (true) | ||||
|             { | ||||
|                 if (indexes.Count - currentIndex >= 64) | ||||
|                     player.QueuePacket(InventoryRemoveX64Packet.BuildPacket(owner.actorId, indexes, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryRemoveX64Packet.BuildPacket(owner.Id, indexes, ref currentIndex)); | ||||
|                 else if (indexes.Count - currentIndex >= 32) | ||||
|                     player.QueuePacket(InventoryRemoveX32Packet.BuildPacket(owner.actorId, indexes, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryRemoveX32Packet.BuildPacket(owner.Id, indexes, ref currentIndex)); | ||||
|                 else if (indexes.Count - currentIndex >= 16) | ||||
|                     player.QueuePacket(InventoryRemoveX16Packet.BuildPacket(owner.actorId, indexes, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryRemoveX16Packet.BuildPacket(owner.Id, indexes, ref currentIndex)); | ||||
|                 else if (indexes.Count - currentIndex > 1) | ||||
|                     player.QueuePacket(InventoryRemoveX08Packet.BuildPacket(owner.actorId, indexes, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryRemoveX08Packet.BuildPacket(owner.Id, indexes, ref currentIndex)); | ||||
|                 else if (indexes.Count - currentIndex == 1) | ||||
|                 { | ||||
|                     player.QueuePacket(InventoryRemoveX01Packet.BuildPacket(owner.actorId, indexes[currentIndex])); | ||||
|                     player.QueuePacket(InventoryRemoveX01Packet.BuildPacket(owner.Id, indexes[currentIndex])); | ||||
|                     currentIndex++; | ||||
|                 } | ||||
|                 else | ||||
|   | ||||
| @@ -286,7 +286,7 @@ namespace Meteor.Map.Actors | ||||
|                     //I think this is, or should be odne in DoBattleAction. Packet capture had the message in the same packet as an attack | ||||
|                     // <actor> defeat/defeats <target> | ||||
|                     if (actionContainer != null) | ||||
|                         actionContainer.AddEXPAction(new CommandResult(actorId, 30108, 0)); | ||||
|                         actionContainer.AddEXPAction(new CommandResult(Id, 30108, 0)); | ||||
|  | ||||
|                     if (lastAttacker.currentParty != null && lastAttacker.currentParty is Party) | ||||
|                     { | ||||
| @@ -320,7 +320,7 @@ namespace Meteor.Map.Actors | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 var err = String.Format("[{0}][{1}] {2} {3} {4} {5} tried to die ded", actorId, GetUniqueId(), positionX, positionY, positionZ, CurrentArea.GetName()); | ||||
|                 var err = String.Format("[{0}][{1}] {2} {3} {4} {5} tried to die ded", Id, GetUniqueId(), positionX, positionY, positionZ, CurrentArea.GetName()); | ||||
|                 Program.Log.Error(err); | ||||
|                 //throw new Exception(err); | ||||
|             } | ||||
|   | ||||
| @@ -58,7 +58,7 @@ namespace Meteor.Map.Actors | ||||
|         public NpcSpawnType npcSpawnType; | ||||
|  | ||||
|         public Npc(int actorNumber, ActorClass actorClass, string uniqueId, Area spawnedArea, float posX, float posY, float posZ, float rot, ushort actorState, uint animationId, string customDisplayName) | ||||
|             : base((4 << 28 | spawnedArea.actorId << 19 | ((uint)actorNumber + 5)))   | ||||
|             : base((4 << 28 | spawnedArea.Id << 19 | ((uint)actorNumber + 5)))   | ||||
|         { | ||||
|             this.positionX = posX; | ||||
|             this.positionY = posY; | ||||
| @@ -67,8 +67,8 @@ namespace Meteor.Map.Actors | ||||
|             this.currentMainState = actorState; | ||||
|             this.animationId = animationId; | ||||
|  | ||||
|             this.displayNameId = actorClass.displayNameId; | ||||
|             this.customDisplayName = customDisplayName; | ||||
|             this.LocalizedDisplayName = actorClass.displayNameId; | ||||
|             this.DisplayName = customDisplayName; | ||||
|  | ||||
|             this.uniqueIdentifier = uniqueId; | ||||
|  | ||||
| @@ -119,7 +119,7 @@ namespace Meteor.Map.Actors | ||||
|         } | ||||
|  | ||||
|         public Npc(int actorNumber, ActorClass actorClass, string uniqueId, Area spawnedArea, float posX, float posY, float posZ, float rot, uint layout, uint instance) | ||||
|             : base((4 << 28 | spawnedArea.actorId << 19 | (uint)actorNumber)) | ||||
|             : base((4 << 28 | spawnedArea.Id << 19 | (uint)actorNumber)) | ||||
|         { | ||||
|             this.positionX = posX; | ||||
|             this.positionY = posY; | ||||
| @@ -128,7 +128,7 @@ namespace Meteor.Map.Actors | ||||
|             this.currentMainState = 0; | ||||
|             this.animationId = 0; | ||||
|  | ||||
|             this.displayNameId = actorClass.displayNameId; | ||||
|             this.LocalizedDisplayName = actorClass.displayNameId; | ||||
|  | ||||
|             this.uniqueIdentifier = uniqueId; | ||||
|  | ||||
| @@ -158,7 +158,7 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|         public SubPacket CreateAddActorPacket() | ||||
|         { | ||||
|             return AddActorPacket.BuildPacket(actorId, 8); | ||||
|             return AddActorPacket.BuildPacket(Id, 8); | ||||
|         } | ||||
|  | ||||
|         // actorClassId, [], [], numBattleCommon, [battleCommon], numEventCommon, [eventCommon], args for either initForBattle/initForEvent | ||||
| @@ -183,7 +183,7 @@ namespace Meteor.Map.Actors | ||||
|                 lParams = LuaUtils.CreateLuaParamList(classPathFake, false, false, false, false, false, 0xF47F6, false, false, 0, 0); | ||||
|                 isStatic = true; | ||||
|                 //ActorInstantiatePacket.BuildPacket(actorId, actorName, classNameFake, lParams).DebugPrintSubPacket(); | ||||
|                 return ActorInstantiatePacket.BuildPacket(actorId, actorName, classNameFake, lParams); | ||||
|                 return ActorInstantiatePacket.BuildPacket(Id, Name, classNameFake, lParams); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
| @@ -197,7 +197,7 @@ namespace Meteor.Map.Actors | ||||
|             } | ||||
|  | ||||
|             //ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams).DebugPrintSubPacket(); | ||||
|             return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams); | ||||
|             return ActorInstantiatePacket.BuildPacket(Id, Name, className, lParams); | ||||
|         } | ||||
|  | ||||
|         public override List<SubPacket> GetSpawnPackets(Player player, ushort spawnType) | ||||
| @@ -209,7 +209,7 @@ namespace Meteor.Map.Actors | ||||
|             subpackets.Add(CreateSpawnPositonPacket(0x0)); | ||||
|  | ||||
|             if (isMapObj) | ||||
|                 subpackets.Add(SetActorBGPropertiesPacket.BuildPacket(actorId, instance, layout)); | ||||
|                 subpackets.Add(SetActorBGPropertiesPacket.BuildPacket(Id, instance, layout)); | ||||
|             else | ||||
|                 subpackets.Add(CreateAppearancePacket()); | ||||
|  | ||||
| @@ -424,7 +424,7 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|         public void PlayMapObjAnimation(Player player, string animationName) | ||||
|         { | ||||
|             player.QueuePacket(PlayBGAnimation.BuildPacket(actorId, animationName)); | ||||
|             player.QueuePacket(PlayBGAnimation.BuildPacket(Id, animationName)); | ||||
|         } | ||||
|  | ||||
|         public void Despawn() | ||||
| @@ -461,7 +461,7 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|         public override void OnDespawn() | ||||
|         { | ||||
|             CurrentArea.BroadcastPacketAroundActor(this, RemoveActorPacket.BuildPacket(this.actorId)); | ||||
|             CurrentArea.BroadcastPacketAroundActor(this, RemoveActorPacket.BuildPacket(this.Id)); | ||||
|             QueuePositionUpdate(spawnX, spawnY, spawnZ); | ||||
|             LuaEngine.CallLuaBattleFunction(this, "onDespawn", this); | ||||
|         } | ||||
|   | ||||
| @@ -39,7 +39,7 @@ namespace Meteor.Map.actors.chara.npc | ||||
|         { | ||||
|             this.retainerId = retainerId; | ||||
|             this.ownerPlayer = player; | ||||
|             this.actorName = String.Format("_rtnre{0:x7}", actorId); | ||||
|             this.Name = String.Format("_rtnre{0:x7}", Id); | ||||
|  | ||||
|             itemPackages[ItemPackage.NORMAL] = new ItemPackage(this, MAXSIZE_INVENTORY_NORMAL, ItemPackage.NORMAL); | ||||
|             itemPackages[ItemPackage.CURRENCY_CRYSTALS] = new ItemPackage(this, MAXSIZE_INVENTORY_CURRANCY, ItemPackage.CURRENCY_CRYSTALS); | ||||
|   | ||||
| @@ -173,7 +173,7 @@ namespace Meteor.Map.Actors | ||||
|         public Player(Session cp, uint actorID) : base(actorID) | ||||
|         { | ||||
|             playerSession = cp; | ||||
|             actorName = String.Format("_pc{0:00000000}", actorID); | ||||
|             Name = String.Format("_pc{0:00000000}", actorID); | ||||
|             className = "Player"; | ||||
|  | ||||
|             moveSpeeds[0] = SetActorSpeedPacket.DEFAULT_STOP; | ||||
| @@ -279,14 +279,14 @@ namespace Meteor.Map.Actors | ||||
|         public List<SubPacket> Create0x132Packets() | ||||
|         { | ||||
|             List<SubPacket> packets = new List<SubPacket>(); | ||||
|             packets.Add(_0x132Packet.BuildPacket(actorId, 0xB, "commandForced")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(actorId, 0xA, "commandDefault")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(actorId, 0x6, "commandWeak")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(actorId, 0x4, "commandContent")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(actorId, 0x6, "commandJudgeMode")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(actorId, 0x100, "commandRequest")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(actorId, 0x100, "widgetCreate")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(actorId, 0x100, "macroRequest")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(Id, 0xB, "commandForced")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(Id, 0xA, "commandDefault")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(Id, 0x6, "commandWeak")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(Id, 0x4, "commandContent")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(Id, 0x6, "commandJudgeMode")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(Id, 0x100, "commandRequest")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(Id, 0x100, "widgetCreate")); | ||||
|             packets.Add(_0x132Packet.BuildPacket(Id, 0x100, "macroRequest")); | ||||
|             return packets; | ||||
|         } | ||||
|  | ||||
| @@ -304,7 +304,7 @@ namespace Meteor.Map.Actors | ||||
|         public override SubPacket CreateScriptBindPacket(Player requestPlayer) | ||||
|         { | ||||
|             List<LuaParam> lParams; | ||||
|             if (IsMyPlayer(requestPlayer.actorId)) | ||||
|             if (IsMyPlayer(requestPlayer.Id)) | ||||
|             { | ||||
|                 if (loginInitDirector != null) | ||||
|                     lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, true, loginInitDirector, true, 0, false, timers, true); | ||||
| @@ -314,29 +314,29 @@ namespace Meteor.Map.Actors | ||||
|             else | ||||
|                 lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, false, false, false, true); | ||||
|  | ||||
|             ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams).DebugPrintSubPacket(); | ||||
|             ActorInstantiatePacket.BuildPacket(Id, Name, className, lParams).DebugPrintSubPacket(); | ||||
|  | ||||
|  | ||||
|             return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams); | ||||
|             return ActorInstantiatePacket.BuildPacket(Id, Name, className, lParams); | ||||
|         } | ||||
|  | ||||
|         public override List<SubPacket> GetSpawnPackets(Player requestPlayer, ushort spawnType) | ||||
|         { | ||||
|             List<SubPacket> subpackets = new List<SubPacket>(); | ||||
|             subpackets.Add(CreateAddActorPacket(8)); | ||||
|             if (IsMyPlayer(requestPlayer.actorId)) | ||||
|             if (IsMyPlayer(requestPlayer.Id)) | ||||
|                 subpackets.AddRange(Create0x132Packets()); | ||||
|             subpackets.Add(CreateSpeedPacket()); | ||||
|             subpackets.Add(CreateSpawnPositonPacket(this, spawnType)); | ||||
|             subpackets.Add(CreateAppearancePacket()); | ||||
|             subpackets.Add(CreateNamePacket()); | ||||
|             subpackets.Add(_0xFPacket.BuildPacket(actorId)); | ||||
|             subpackets.Add(_0xFPacket.BuildPacket(Id)); | ||||
|             subpackets.Add(CreateStatePacket()); | ||||
|             subpackets.Add(CreateSubStatePacket()); | ||||
|             subpackets.Add(CreateInitStatusPacket()); | ||||
|             subpackets.Add(CreateSetActorIconPacket()); | ||||
|             subpackets.Add(CreateIsZoneingPacket()); | ||||
|             subpackets.AddRange(CreatePlayerRelatedPackets(requestPlayer.actorId)); | ||||
|             subpackets.AddRange(CreatePlayerRelatedPackets(requestPlayer.Id)); | ||||
|             subpackets.Add(CreateScriptBindPacket(requestPlayer)); | ||||
|             return subpackets; | ||||
|         } | ||||
| @@ -356,7 +356,7 @@ namespace Meteor.Map.Actors | ||||
|                     isMale = false; | ||||
|                     break; | ||||
|             } | ||||
|             return SetActorNamePacket.BuildPacket(actorId, customDisplayName != null ? 0 : displayNameId, displayNameId == 0xFFFFFFFF | displayNameId == 0x0 | customDisplayName != null ? customDisplayName : "", isMale); | ||||
|             return SetActorNamePacket.BuildPacket(Id, DisplayName != null ? 0 : LocalizedDisplayName, LocalizedDisplayName == 0xFFFFFFFF | LocalizedDisplayName == 0x0 | DisplayName != null ? DisplayName : "", isMale); | ||||
|         } | ||||
|  | ||||
|         public List<SubPacket> CreatePlayerRelatedPackets(uint requestingPlayerActorId) | ||||
| @@ -364,37 +364,37 @@ namespace Meteor.Map.Actors | ||||
|             List<SubPacket> subpackets = new List<SubPacket>(); | ||||
|  | ||||
|             if (gcCurrent != 0) | ||||
|                 subpackets.Add(SetGrandCompanyPacket.BuildPacket(actorId, gcCurrent, gcRankLimsa, gcRankGridania, gcRankUldah)); | ||||
|                 subpackets.Add(SetGrandCompanyPacket.BuildPacket(Id, gcCurrent, gcRankLimsa, gcRankGridania, gcRankUldah)); | ||||
|  | ||||
|             if (currentTitle != 0) | ||||
|                 subpackets.Add(SetPlayerTitlePacket.BuildPacket(actorId, currentTitle)); | ||||
|                 subpackets.Add(SetPlayerTitlePacket.BuildPacket(Id, currentTitle)); | ||||
|  | ||||
|             if (currentJob != 0) | ||||
|                 subpackets.Add(SetCurrentJobPacket.BuildPacket(actorId, currentJob)); | ||||
|                 subpackets.Add(SetCurrentJobPacket.BuildPacket(Id, currentJob)); | ||||
|  | ||||
|             if (IsMyPlayer(requestingPlayerActorId)) | ||||
|             { | ||||
|                 subpackets.Add(SetSpecialEventWorkPacket.BuildPacket(actorId)); | ||||
|                 subpackets.Add(SetSpecialEventWorkPacket.BuildPacket(Id)); | ||||
|  | ||||
|                 if (hasChocobo && chocoboName != null && !chocoboName.Equals("")) | ||||
|                 { | ||||
|                     subpackets.Add(SetChocoboNamePacket.BuildPacket(actorId, chocoboName)); | ||||
|                     subpackets.Add(SetHasChocoboPacket.BuildPacket(actorId, hasChocobo)); | ||||
|                     subpackets.Add(SetChocoboNamePacket.BuildPacket(Id, chocoboName)); | ||||
|                     subpackets.Add(SetHasChocoboPacket.BuildPacket(Id, hasChocobo)); | ||||
|                 } | ||||
|  | ||||
|                 if (hasGoobbue) | ||||
|                     subpackets.Add(SetHasGoobbuePacket.BuildPacket(actorId, hasGoobbue)); | ||||
|                     subpackets.Add(SetHasGoobbuePacket.BuildPacket(Id, hasGoobbue)); | ||||
|  | ||||
|                 subpackets.Add(SetAchievementPointsPacket.BuildPacket(actorId, achievementPoints)); | ||||
|                 subpackets.Add(SetAchievementPointsPacket.BuildPacket(Id, achievementPoints)); | ||||
|  | ||||
|                 subpackets.Add(Database.GetLatestAchievements(this)); | ||||
|                 subpackets.Add(Database.GetAchievementsPacket(this)); | ||||
|             } | ||||
|  | ||||
|             if (mountState == 1) | ||||
|                 subpackets.Add(SetCurrentMountChocoboPacket.BuildPacket(actorId, chocoboAppearance, rentalExpireTime, rentalMinLeft)); | ||||
|                 subpackets.Add(SetCurrentMountChocoboPacket.BuildPacket(Id, chocoboAppearance, rentalExpireTime, rentalMinLeft)); | ||||
|             else if (mountState == 2) | ||||
|                 subpackets.Add(SetCurrentMountGoobbuePacket.BuildPacket(actorId, 1)); | ||||
|                 subpackets.Add(SetCurrentMountGoobbuePacket.BuildPacket(Id, 1)); | ||||
|  | ||||
|             //Inn Packets (Dream, Cutscenes, Armoire)    | ||||
|             if (CurrentArea.isInn) | ||||
| @@ -402,8 +402,8 @@ namespace Meteor.Map.Actors | ||||
|                 SetCutsceneBookPacket cutsceneBookPacket = new SetCutsceneBookPacket(); | ||||
|                 for (int i = 0; i < 2048; i++) | ||||
|                     cutsceneBookPacket.cutsceneFlags[i] = true; | ||||
|                 QueuePacket(cutsceneBookPacket.BuildPacket(actorId, "<Path Companion>", 11, 1, 1)); | ||||
|                 QueuePacket(SetPlayerDreamPacket.BuildPacket(actorId, 0x16, GetInnCode())); | ||||
|                 QueuePacket(cutsceneBookPacket.BuildPacket(Id, "<Path Companion>", 11, 1, 1)); | ||||
|                 QueuePacket(SetPlayerDreamPacket.BuildPacket(Id, 0x16, GetInnCode())); | ||||
|             } | ||||
|  | ||||
|             return subpackets; | ||||
| @@ -578,39 +578,39 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|         public void SendSeamlessZoneInPackets() | ||||
|         { | ||||
|             QueuePacket(SetMusicPacket.BuildPacket(actorId, CurrentArea.bgmDay, SetMusicPacket.EFFECT_FADEIN)); | ||||
|             QueuePacket(SetWeatherPacket.BuildPacket(actorId, SetWeatherPacket.WEATHER_CLEAR, 1)); | ||||
|             QueuePacket(SetMusicPacket.BuildPacket(Id, CurrentArea.bgmDay, SetMusicPacket.EFFECT_FADEIN)); | ||||
|             QueuePacket(SetWeatherPacket.BuildPacket(Id, SetWeatherPacket.WEATHER_CLEAR, 1)); | ||||
|         } | ||||
|  | ||||
|         public void SendZoneInPackets(WorldManager world, ushort spawnType) | ||||
|         { | ||||
|             QueuePacket(SetActorIsZoningPacket.BuildPacket(actorId, false)); | ||||
|             QueuePacket(SetDalamudPacket.BuildPacket(actorId, 0)); | ||||
|             QueuePacket(SetActorIsZoningPacket.BuildPacket(Id, false)); | ||||
|             QueuePacket(SetDalamudPacket.BuildPacket(Id, 0)); | ||||
|  | ||||
|             //Music Packets | ||||
|             if (currentMainState == SetActorStatePacket.MAIN_STATE_MOUNTED) | ||||
|             { | ||||
|                 if (rentalExpireTime != 0) | ||||
|                     QueuePacket(SetMusicPacket.BuildPacket(actorId, 64, 0x01)); //Rental | ||||
|                     QueuePacket(SetMusicPacket.BuildPacket(Id, 64, 0x01)); //Rental | ||||
|                 else | ||||
|                 { | ||||
|                     if (mountState == 1) | ||||
|                         QueuePacket(SetMusicPacket.BuildPacket(actorId, 83, 0x01)); //Mount | ||||
|                         QueuePacket(SetMusicPacket.BuildPacket(Id, 83, 0x01)); //Mount | ||||
|                     else | ||||
|                         QueuePacket(SetMusicPacket.BuildPacket(actorId, 98, 0x01)); //Goobbue | ||||
|                         QueuePacket(SetMusicPacket.BuildPacket(Id, 98, 0x01)); //Goobbue | ||||
|                 } | ||||
|             } | ||||
|             else | ||||
|                 QueuePacket(SetMusicPacket.BuildPacket(actorId, CurrentArea.bgmDay, 0x01)); //Zone | ||||
|                 QueuePacket(SetMusicPacket.BuildPacket(Id, CurrentArea.bgmDay, 0x01)); //Zone | ||||
|  | ||||
|             QueuePacket(SetWeatherPacket.BuildPacket(actorId, SetWeatherPacket.WEATHER_CLEAR, 1)); | ||||
|             QueuePacket(SetWeatherPacket.BuildPacket(Id, SetWeatherPacket.WEATHER_CLEAR, 1)); | ||||
|  | ||||
|             QueuePacket(SetMapPacket.BuildPacket(actorId, CurrentArea.RegionId, CurrentArea.ZoneId)); | ||||
|             QueuePacket(SetMapPacket.BuildPacket(Id, CurrentArea.RegionId, CurrentArea.ZoneId)); | ||||
|  | ||||
|             QueuePackets(GetSpawnPackets(this, spawnType)); | ||||
|  | ||||
|             #region Inventory & Equipment | ||||
|             QueuePacket(InventoryBeginChangePacket.BuildPacket(actorId, true)); | ||||
|             QueuePacket(InventoryBeginChangePacket.BuildPacket(Id, true)); | ||||
|             itemPackages[ItemPackage.NORMAL].SendFullPackage(this); | ||||
|             itemPackages[ItemPackage.CURRENCY_CRYSTALS].SendFullPackage(this); | ||||
|             itemPackages[ItemPackage.KEYITEMS].SendFullPackage(this); | ||||
| @@ -618,7 +618,7 @@ namespace Meteor.Map.Actors | ||||
|             itemPackages[ItemPackage.MELDREQUEST].SendFullPackage(this); | ||||
|             itemPackages[ItemPackage.LOOT].SendFullPackage(this); | ||||
|             equipment.SendUpdate(this); | ||||
|             playerSession.QueuePacket(InventoryEndChangePacket.BuildPacket(actorId)); | ||||
|             playerSession.QueuePacket(InventoryEndChangePacket.BuildPacket(Id)); | ||||
|             #endregion | ||||
|  | ||||
|             playerSession.QueuePacket(GetInitPackets()); | ||||
| @@ -658,15 +658,15 @@ namespace Meteor.Map.Actors | ||||
|             while (true) | ||||
|             { | ||||
|                 if (slots.Count - currentIndex >= 64) | ||||
|                     QueuePacket(InventoryRemoveX64Packet.BuildPacket(actorId, slots, ref currentIndex)); | ||||
|                     QueuePacket(InventoryRemoveX64Packet.BuildPacket(Id, slots, ref currentIndex)); | ||||
|                 else if (slots.Count - currentIndex >= 32) | ||||
|                     QueuePacket(InventoryRemoveX32Packet.BuildPacket(actorId, slots, ref currentIndex)); | ||||
|                     QueuePacket(InventoryRemoveX32Packet.BuildPacket(Id, slots, ref currentIndex)); | ||||
|                 else if (slots.Count - currentIndex >= 16) | ||||
|                     QueuePacket(InventoryRemoveX16Packet.BuildPacket(actorId, slots, ref currentIndex)); | ||||
|                     QueuePacket(InventoryRemoveX16Packet.BuildPacket(Id, slots, ref currentIndex)); | ||||
|                 else if (slots.Count - currentIndex >= 8) | ||||
|                     QueuePacket(InventoryRemoveX08Packet.BuildPacket(actorId, slots, ref currentIndex)); | ||||
|                     QueuePacket(InventoryRemoveX08Packet.BuildPacket(Id, slots, ref currentIndex)); | ||||
|                 else if (slots.Count - currentIndex == 1) | ||||
|                     QueuePacket(InventoryRemoveX01Packet.BuildPacket(actorId, slots[currentIndex])); | ||||
|                     QueuePacket(InventoryRemoveX01Packet.BuildPacket(Id, slots[currentIndex])); | ||||
|                 else | ||||
|                     break; | ||||
|             } | ||||
| @@ -675,7 +675,7 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|         public bool IsMyPlayer(uint otherActorId) | ||||
|         { | ||||
|             return actorId == otherActorId; | ||||
|             return Id == otherActorId; | ||||
|         } | ||||
|  | ||||
|         public void QueuePacket(SubPacket packet) | ||||
| @@ -695,7 +695,7 @@ namespace Meteor.Map.Actors | ||||
|             { | ||||
|                 BasePacket packet = new BasePacket(path); | ||||
|  | ||||
|                 packet.ReplaceActorID(actorId); | ||||
|                 packet.ReplaceActorID(Id); | ||||
|                 var packets = packet.GetSubpackets(); | ||||
|                 QueuePackets(packets); | ||||
|             } | ||||
| @@ -713,7 +713,7 @@ namespace Meteor.Map.Actors | ||||
|                 if (sendToSelf) | ||||
|                 { | ||||
|  | ||||
|                     SubPacket clonedPacket = new SubPacket(packet, actorId); | ||||
|                     SubPacket clonedPacket = new SubPacket(packet, Id); | ||||
|                     QueuePacket(clonedPacket); | ||||
|                 } | ||||
|  | ||||
| @@ -726,7 +726,7 @@ namespace Meteor.Map.Actors | ||||
|                         if (p.Equals(this)) | ||||
|                             continue; | ||||
|  | ||||
|                         SubPacket clonedPacket = new SubPacket(packet, a.actorId); | ||||
|                         SubPacket clonedPacket = new SubPacket(packet, a.Id); | ||||
|                         p.QueuePacket(clonedPacket); | ||||
|                     } | ||||
|                 } | ||||
| @@ -737,7 +737,7 @@ namespace Meteor.Map.Actors | ||||
|         { | ||||
|             if (sendToSelf) | ||||
|             { | ||||
|                 SubPacket clonedPacket = new SubPacket(packet, actorId); | ||||
|                 SubPacket clonedPacket = new SubPacket(packet, Id); | ||||
|                 QueuePacket(clonedPacket); | ||||
|             } | ||||
|  | ||||
| @@ -750,7 +750,7 @@ namespace Meteor.Map.Actors | ||||
|                     if (p.Equals(this)) | ||||
|                         continue; | ||||
|  | ||||
|                     SubPacket clonedPacket = new SubPacket(packet, a.actorId); | ||||
|                     SubPacket clonedPacket = new SubPacket(packet, a.Id); | ||||
|                     p.QueuePacket(clonedPacket); | ||||
|                 } | ||||
|             } | ||||
| @@ -767,14 +767,14 @@ namespace Meteor.Map.Actors | ||||
|         { | ||||
|             if (flag) | ||||
|             { | ||||
|                 BroadcastPacket(SetActorIconPacket.BuildPacket(actorId, SetActorIconPacket.DISCONNECTING), true); | ||||
|                 BroadcastPacket(SetActorIconPacket.BuildPacket(Id, SetActorIconPacket.DISCONNECTING), true); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 if (isGM) | ||||
|                     BroadcastPacket(SetActorIconPacket.BuildPacket(actorId, SetActorIconPacket.ISGM), true); | ||||
|                     BroadcastPacket(SetActorIconPacket.BuildPacket(Id, SetActorIconPacket.ISGM), true); | ||||
|                 else | ||||
|                     BroadcastPacket(SetActorIconPacket.BuildPacket(actorId, 0), true); | ||||
|                     BroadcastPacket(SetActorIconPacket.BuildPacket(Id, 0), true); | ||||
|             } | ||||
|         } | ||||
|  | ||||
| @@ -833,7 +833,7 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|         public void SendMessage(uint logType, string sender, string message) | ||||
|         { | ||||
|             QueuePacket(SendMessagePacket.BuildPacket(actorId, logType, sender, message)); | ||||
|             QueuePacket(SendMessagePacket.BuildPacket(Id, logType, sender, message)); | ||||
|         } | ||||
|  | ||||
|         //Only use at logout since it's intensive | ||||
| @@ -881,14 +881,14 @@ namespace Meteor.Map.Actors | ||||
|         public void Logout() | ||||
|         { | ||||
|             // todo: really this should be in CleanupAndSave but we might want logout/disconnect handled separately for some effects | ||||
|             QueuePacket(LogoutPacket.BuildPacket(actorId)); | ||||
|             QueuePacket(LogoutPacket.BuildPacket(Id)); | ||||
|             statusEffects.RemoveStatusEffectsByFlags((uint)StatusEffectFlags.LoseOnLogout); | ||||
|             CleanupAndSave(); | ||||
|         } | ||||
|  | ||||
|         public void QuitGame() | ||||
|         { | ||||
|             QueuePacket(QuitPacket.BuildPacket(actorId)); | ||||
|             QueuePacket(QuitPacket.BuildPacket(Id)); | ||||
|             statusEffects.RemoveStatusEffectsByFlags((uint)StatusEffectFlags.LoseOnLogout); | ||||
|             CleanupAndSave(); | ||||
|         } | ||||
| @@ -912,7 +912,7 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|         public void ChangeMusic(ushort musicId) | ||||
|         { | ||||
|             QueuePacket(SetMusicPacket.BuildPacket(actorId, musicId, 1)); | ||||
|             QueuePacket(SetMusicPacket.BuildPacket(Id, musicId, 1)); | ||||
|         } | ||||
|  | ||||
|         public void ChangeMusic(ushort musicId, ushort musicTrackMode) | ||||
| @@ -926,9 +926,9 @@ namespace Meteor.Map.Actors | ||||
|         public void SendMountAppearance() | ||||
|         { | ||||
|             if (mountState == 1) | ||||
|                 BroadcastPacket(SetCurrentMountChocoboPacket.BuildPacket(actorId, chocoboAppearance, rentalExpireTime, rentalMinLeft), true); | ||||
|                 BroadcastPacket(SetCurrentMountChocoboPacket.BuildPacket(Id, chocoboAppearance, rentalExpireTime, rentalMinLeft), true); | ||||
|             else if (mountState == 2) | ||||
|                 BroadcastPacket(SetCurrentMountGoobbuePacket.BuildPacket(actorId, 1), true); | ||||
|                 BroadcastPacket(SetCurrentMountGoobbuePacket.BuildPacket(Id, 1), true); | ||||
|         } | ||||
|  | ||||
|         public void SetMountState(byte mountState) | ||||
| @@ -944,41 +944,41 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|         public void DoEmote(uint targettedActor, uint animId, uint descId) | ||||
|         { | ||||
|             BroadcastPacket(ActorDoEmotePacket.BuildPacket(actorId, targettedActor, animId, descId), true); | ||||
|             BroadcastPacket(ActorDoEmotePacket.BuildPacket(Id, targettedActor, animId, descId), true); | ||||
|         } | ||||
|  | ||||
|         public void SendGameMessage(Actor sourceActor, Actor textIdOwner, ushort textId, byte log, params object[] msgParams) | ||||
|         { | ||||
|             if (msgParams == null || msgParams.Length == 0) | ||||
|             { | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, sourceActor.actorId, textIdOwner.actorId, textId, log)); | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, sourceActor.Id, textIdOwner.Id, textId, log)); | ||||
|             } | ||||
|             else | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, sourceActor.actorId, textIdOwner.actorId, textId, log, LuaUtils.CreateLuaParamList(msgParams))); | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, sourceActor.Id, textIdOwner.Id, textId, log, LuaUtils.CreateLuaParamList(msgParams))); | ||||
|         } | ||||
|  | ||||
|         public void SendGameMessage(Actor textIdOwner, ushort textId, byte log, params object[] msgParams) | ||||
|         { | ||||
|             if (msgParams == null || msgParams.Length == 0) | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, textIdOwner.actorId, textId, log)); | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, textIdOwner.Id, textId, log)); | ||||
|             else | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, textIdOwner.actorId, textId, log, LuaUtils.CreateLuaParamList(msgParams))); | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, textIdOwner.Id, textId, log, LuaUtils.CreateLuaParamList(msgParams))); | ||||
|         } | ||||
|  | ||||
|         public void SendGameMessageCustomSender(Actor textIdOwner, ushort textId, byte log, string customSender, params object[] msgParams) | ||||
|         { | ||||
|             if (msgParams == null || msgParams.Length == 0) | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, textIdOwner.actorId, textId, customSender, log)); | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, textIdOwner.Id, textId, customSender, log)); | ||||
|             else | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, textIdOwner.actorId, textId, customSender, log, LuaUtils.CreateLuaParamList(msgParams))); | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, textIdOwner.Id, textId, customSender, log, LuaUtils.CreateLuaParamList(msgParams))); | ||||
|         } | ||||
|  | ||||
|         public void SendGameMessageDisplayIDSender(Actor textIdOwner, ushort textId, byte log, uint displayId, params object[] msgParams) | ||||
|         { | ||||
|             if (msgParams == null || msgParams.Length == 0) | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, textIdOwner.actorId, textId, displayId, log)); | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, textIdOwner.Id, textId, displayId, log)); | ||||
|             else | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().actorId, textIdOwner.actorId, textId, displayId, log, LuaUtils.CreateLuaParamList(msgParams))); | ||||
|                 QueuePacket(GameMessagePacket.BuildPacket(Server.GetWorldManager().GetActor().Id, textIdOwner.Id, textId, displayId, log, LuaUtils.CreateLuaParamList(msgParams))); | ||||
|         } | ||||
|  | ||||
|         public void BroadcastWorldMessage(ushort worldMasterId, params object[] msgParams) | ||||
| @@ -1105,7 +1105,7 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|                 charaInfo1.AddTarget(); | ||||
|  | ||||
|                 QueuePacket(charaInfo1.BuildPacket(actorId)); | ||||
|                 QueuePacket(charaInfo1.BuildPacket(Id)); | ||||
|             } | ||||
|             else if (lastStep == 1) | ||||
|             { | ||||
| @@ -1136,7 +1136,7 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|                 charaInfo1.AddTarget(); | ||||
|  | ||||
|                 QueuePacket(charaInfo1.BuildPacket(actorId)); | ||||
|                 QueuePacket(charaInfo1.BuildPacket(Id)); | ||||
|             } | ||||
|             | ||||
|         } | ||||
| @@ -1324,7 +1324,7 @@ namespace Meteor.Map.Actors | ||||
|         { | ||||
|             foreach (Actor a in playerSession.actorInstanceList) | ||||
|             { | ||||
|                 if (a.actorId == actorId) | ||||
|                 if (a.Id == actorId) | ||||
|                     return a; | ||||
|             } | ||||
|  | ||||
| @@ -1479,7 +1479,7 @@ namespace Meteor.Map.Actors | ||||
|         public void AddQuest(uint id, bool isSilent = false) | ||||
|         { | ||||
|             Actor actor = Server.GetStaticActors((0xA0F00000 | id)); | ||||
|             AddQuest(actor.actorName, isSilent); | ||||
|             AddQuest(actor.Name, isSilent); | ||||
|         } | ||||
|  | ||||
|         public void AddQuest(string name, bool isSilent = false) | ||||
| @@ -1494,7 +1494,7 @@ namespace Meteor.Map.Actors | ||||
|             if (freeSlot == -1) | ||||
|                 return; | ||||
|  | ||||
|             playerWork.questScenario[freeSlot] = baseQuest.actorId; | ||||
|             playerWork.questScenario[freeSlot] = baseQuest.Id; | ||||
|             questScenario[freeSlot] = new Quest(this, baseQuest); | ||||
|             Database.SaveQuest(this, questScenario[freeSlot]); | ||||
|             SendQuestClientUpdate(freeSlot); | ||||
| @@ -1508,7 +1508,7 @@ namespace Meteor.Map.Actors | ||||
|         public void CompleteQuest(uint id) | ||||
|         { | ||||
|             Actor actor = Server.GetStaticActors((0xA0F00000 | id)); | ||||
|             CompleteQuest(actor.actorName); | ||||
|             CompleteQuest(actor.Name); | ||||
|         } | ||||
|  | ||||
|         public void CompleteQuest(string name) | ||||
| @@ -1518,7 +1518,7 @@ namespace Meteor.Map.Actors | ||||
|             if (actor == null) | ||||
|                 return; | ||||
|  | ||||
|             uint id = actor.actorId; | ||||
|             uint id = actor.Id; | ||||
|             if (HasQuest(id)) | ||||
|             { | ||||
|                 Database.CompleteQuest(playerSession.GetActor(), id); | ||||
| @@ -1546,9 +1546,9 @@ namespace Meteor.Map.Actors | ||||
|             { | ||||
|                 for (int i = 0; i < questScenario.Length; i++) | ||||
|                 { | ||||
|                     if (questScenario[i] != null && questScenario[i].actorId == id) | ||||
|                     if (questScenario[i] != null && questScenario[i].Id == id) | ||||
|                     { | ||||
|                         Database.RemoveQuest(this, questScenario[i].actorId); | ||||
|                         Database.RemoveQuest(this, questScenario[i].Id); | ||||
|                         questScenario[i] = null; | ||||
|                         playerWork.questScenario[i] = 0; | ||||
|                         SendQuestClientUpdate(i); | ||||
| @@ -1588,13 +1588,13 @@ namespace Meteor.Map.Actors | ||||
|         public bool CanAcceptQuest(uint id) | ||||
|         { | ||||
|             Actor actor = Server.GetStaticActors((0xA0F00000 | id)); | ||||
|             return CanAcceptQuest(actor.actorName); | ||||
|             return CanAcceptQuest(actor.Name); | ||||
|         } | ||||
|  | ||||
|         public bool IsQuestCompleted(string questName) | ||||
|         { | ||||
|             Actor actor = Server.GetStaticActors(questName); | ||||
|             return IsQuestCompleted(actor.actorId); | ||||
|             return IsQuestCompleted(actor.Id); | ||||
|         } | ||||
|  | ||||
|         public bool IsQuestCompleted(uint questId) | ||||
| @@ -1606,7 +1606,7 @@ namespace Meteor.Map.Actors | ||||
|         { | ||||
|             for (int i = 0; i < questScenario.Length; i++) | ||||
|             { | ||||
|                 if (questScenario[i] != null && questScenario[i].actorId == (0xA0F00000 | id)) | ||||
|                 if (questScenario[i] != null && questScenario[i].Id == (0xA0F00000 | id)) | ||||
|                     return questScenario[i]; | ||||
|             } | ||||
|  | ||||
| @@ -1617,7 +1617,7 @@ namespace Meteor.Map.Actors | ||||
|         { | ||||
|             for (int i = 0; i < questScenario.Length; i++) | ||||
|             { | ||||
|                 if (questScenario[i] != null && questScenario[i].actorName.ToLower().Equals(name.ToLower())) | ||||
|                 if (questScenario[i] != null && questScenario[i].Name.ToLower().Equals(name.ToLower())) | ||||
|                     return questScenario[i]; | ||||
|             } | ||||
|  | ||||
| @@ -1628,7 +1628,7 @@ namespace Meteor.Map.Actors | ||||
|         { | ||||
|             for (int i = 0; i < questScenario.Length; i++) | ||||
|             { | ||||
|                 if (questScenario[i] != null && questScenario[i].actorName.ToLower().Equals(name.ToLower())) | ||||
|                 if (questScenario[i] != null && questScenario[i].Name.ToLower().Equals(name.ToLower())) | ||||
|                     return true; | ||||
|             } | ||||
|  | ||||
| @@ -1639,7 +1639,7 @@ namespace Meteor.Map.Actors | ||||
|         { | ||||
|             for (int i = 0; i < questScenario.Length; i++) | ||||
|             { | ||||
|                 if (questScenario[i] != null && questScenario[i].actorId == (0xA0F00000 | id)) | ||||
|                 if (questScenario[i] != null && questScenario[i].Id == (0xA0F00000 | id)) | ||||
|                     return true; | ||||
|             } | ||||
|  | ||||
| @@ -1661,7 +1661,7 @@ namespace Meteor.Map.Actors | ||||
|         { | ||||
|             for (int i = 0; i < questScenario.Length; i++) | ||||
|             { | ||||
|                 if (questScenario[i] != null && questScenario[i].actorId == (0xA0F00000 | id)) | ||||
|                 if (questScenario[i] != null && questScenario[i].Id == (0xA0F00000 | id)) | ||||
|                     return i; | ||||
|             } | ||||
|  | ||||
| @@ -1834,7 +1834,7 @@ namespace Meteor.Map.Actors | ||||
|         { | ||||
|             if (ownedDirectors.Contains(director)) | ||||
|             { | ||||
|                 QueuePacket(RemoveActorPacket.BuildPacket(director.actorId)); | ||||
|                 QueuePacket(RemoveActorPacket.BuildPacket(director.Id)); | ||||
|                 ownedDirectors.Remove(director); | ||||
|                 director.RemoveMember(this); | ||||
|             } | ||||
| @@ -1866,7 +1866,7 @@ namespace Meteor.Map.Actors | ||||
|         { | ||||
|             foreach (Director d in ownedDirectors) | ||||
|             { | ||||
|                 if (d.actorId == id) | ||||
|                 if (d.Id == id) | ||||
|                     return d; | ||||
|             } | ||||
|  | ||||
| @@ -1881,15 +1881,15 @@ namespace Meteor.Map.Actors | ||||
|             else | ||||
|                 return; | ||||
|  | ||||
|             QueuePacket(InventoryBeginChangePacket.BuildPacket(toBeExamined.actorId, true)); | ||||
|             QueuePacket(InventoryBeginChangePacket.BuildPacket(toBeExamined.Id, true)); | ||||
|             toBeExamined.GetEquipment().SendUpdateAsItemPackage(this, ItemPackage.MAXSIZE_EQUIPMENT_OTHERPLAYER, ItemPackage.EQUIPMENT_OTHERPLAYER); | ||||
|             QueuePacket(InventoryEndChangePacket.BuildPacket(toBeExamined.actorId)); | ||||
|             QueuePacket(InventoryEndChangePacket.BuildPacket(toBeExamined.Id)); | ||||
|         }         | ||||
|  | ||||
|         public void SendDataPacket(params object[] parameters) | ||||
|         { | ||||
|             List<LuaParam> lParams = LuaUtils.CreateLuaParamList(parameters); | ||||
|             SubPacket spacket = GenericDataPacket.BuildPacket(actorId, lParams); | ||||
|             SubPacket spacket = GenericDataPacket.BuildPacket(Id, lParams); | ||||
|             spacket.DebugPrintSubPacket(); | ||||
|             QueuePacket(spacket); | ||||
|         } | ||||
| @@ -1913,7 +1913,7 @@ namespace Meteor.Map.Actors | ||||
|                 return; | ||||
|  | ||||
|             List<LuaParam> lParams = LuaUtils.CreateLuaParamList(parameters); | ||||
|             SubPacket spacket = KickEventPacket.BuildPacket(actorId, actor.actorId, eventName, 5, lParams); | ||||
|             SubPacket spacket = KickEventPacket.BuildPacket(Id, actor.Id, eventName, 5, lParams); | ||||
|             spacket.DebugPrintSubPacket(); | ||||
|             QueuePacket(spacket); | ||||
|         } | ||||
| @@ -1924,27 +1924,27 @@ namespace Meteor.Map.Actors | ||||
|                 return; | ||||
|  | ||||
|             List<LuaParam> lParams = LuaUtils.CreateLuaParamList(parameters); | ||||
|             SubPacket spacket = KickEventPacket.BuildPacket(actorId, actor.actorId, eventName, 0, lParams); | ||||
|             SubPacket spacket = KickEventPacket.BuildPacket(Id, actor.Id, eventName, 0, lParams); | ||||
|             spacket.DebugPrintSubPacket(); | ||||
|             QueuePacket(spacket); | ||||
|         } | ||||
|  | ||||
|         public void SetEventStatus(Actor actor, string conditionName, bool enabled, byte type) | ||||
|         { | ||||
|             QueuePacket(SetEventStatusPacket.BuildPacket(actor.actorId, enabled, type, conditionName)); | ||||
|             QueuePacket(SetEventStatusPacket.BuildPacket(actor.Id, enabled, type, conditionName)); | ||||
|         }        | ||||
|  | ||||
|         public void RunEventFunction(string functionName, params object[] parameters) | ||||
|         { | ||||
|             List<LuaParam> lParams = LuaUtils.CreateLuaParamList(parameters); | ||||
|             SubPacket spacket = RunEventFunctionPacket.BuildPacket(actorId, currentEventOwner, currentEventName, currentEventType, functionName, lParams); | ||||
|             SubPacket spacket = RunEventFunctionPacket.BuildPacket(Id, currentEventOwner, currentEventName, currentEventType, functionName, lParams); | ||||
|             spacket.DebugPrintSubPacket(); | ||||
|             QueuePacket(spacket); | ||||
|         } | ||||
|  | ||||
|         public void EndEvent() | ||||
|         { | ||||
|             SubPacket p = EndEventPacket.BuildPacket(actorId, currentEventOwner, currentEventName, currentEventType); | ||||
|             SubPacket p = EndEventPacket.BuildPacket(Id, currentEventOwner, currentEventName, currentEventType); | ||||
|             p.DebugPrintSubPacket(); | ||||
|             QueuePacket(p); | ||||
|  | ||||
| @@ -1956,7 +1956,7 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|         public void BroadcastCountdown(byte countdownLength, ulong syncTime) | ||||
|         { | ||||
|             BroadcastPacket(StartCountdownPacket.BuildPacket(actorId, countdownLength, syncTime, "Go!"), true); | ||||
|             BroadcastPacket(StartCountdownPacket.BuildPacket(Id, countdownLength, syncTime, "Go!"), true); | ||||
|         } | ||||
|          | ||||
|         public void SendInstanceUpdate(bool force = false) | ||||
| @@ -1983,7 +1983,7 @@ namespace Meteor.Map.Actors | ||||
|             if (IsInParty()) | ||||
|             { | ||||
|                 Party party = (Party)currentParty; | ||||
|                 return party.GetLeader() == actorId; | ||||
|                 return party.GetLeader() == Id; | ||||
|             } | ||||
|             else | ||||
|                 return false; | ||||
| @@ -2045,7 +2045,7 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|             for (int i = 0; i < partyGroup.members.Count; i++) | ||||
|             { | ||||
|                 if (partyGroup.members[i] == actorId) | ||||
|                 if (partyGroup.members[i] == Id) | ||||
|                 { | ||||
|                     partyGroup.members.RemoveAt(i); | ||||
|                     break; | ||||
| @@ -2066,8 +2066,8 @@ namespace Meteor.Map.Actors | ||||
|             chocoboAppearance = appearanceId; | ||||
|             chocoboName = nameResponse; | ||||
|  | ||||
|             QueuePacket(SetChocoboNamePacket.BuildPacket(actorId, chocoboName)); | ||||
|             QueuePacket(SetHasChocoboPacket.BuildPacket(actorId, hasChocobo)); | ||||
|             QueuePacket(SetChocoboNamePacket.BuildPacket(Id, chocoboName)); | ||||
|             QueuePacket(SetHasChocoboPacket.BuildPacket(Id, hasChocobo)); | ||||
|         } | ||||
|  | ||||
|         public void ChangeChocoboAppearance(byte appearanceId) | ||||
| @@ -2471,7 +2471,7 @@ namespace Meteor.Map.Actors | ||||
|                         if (target is BattleNpc) | ||||
|                         { | ||||
|                             var helpingActorId = ((BattleNpc)target).GetMobMod((uint)MobModifier.CallForHelp); | ||||
|                             partyEngaged = this.actorId == helpingActorId || (((BattleNpc)target).GetMobMod((uint)MobModifier.FreeForAll) != 0); | ||||
|                             partyEngaged = this.Id == helpingActorId || (((BattleNpc)target).GetMobMod((uint)MobModifier.FreeForAll) != 0); | ||||
|                         } | ||||
|  | ||||
|                         if (!partyEngaged) | ||||
| @@ -2486,7 +2486,7 @@ namespace Meteor.Map.Actors | ||||
|                             } | ||||
|                         } | ||||
|                     } | ||||
|                     else if (target.currentLockedTarget == actorId) | ||||
|                     else if (target.currentLockedTarget == Id) | ||||
|                     { | ||||
|                         partyEngaged = true; | ||||
|                     } | ||||
| @@ -2658,7 +2658,7 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|             //You earn [exp] (+[bonusPercent]%) experience points. | ||||
|             //In non-english languages there are unique messages for each language, hence the use of ClassExperienceTextIds | ||||
|             actionList.Add(new CommandResult(actorId, BattleUtils.ClassExperienceTextIds[classId], 0, (ushort)exp, bonusPercent)); | ||||
|             actionList.Add(new CommandResult(Id, BattleUtils.ClassExperienceTextIds[classId], 0, (ushort)exp, bonusPercent)); | ||||
|  | ||||
|             bool leveled = false; | ||||
|             int diff = MAXEXP[GetLevel() - 1] - charaWork.battleSave.skillPoint[classId - 1];             | ||||
| @@ -2714,7 +2714,7 @@ namespace Meteor.Map.Actors | ||||
|                 if (actionList != null) | ||||
|                 { | ||||
|                     if (classId == GetCurrentClassOrJob() || jobId == GetCurrentClassOrJob()) | ||||
|                         actionList.Add(new CommandResult(actorId, 33926, 0, commandId)); | ||||
|                         actionList.Add(new CommandResult(Id, 33926, 0, commandId)); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| @@ -2730,7 +2730,7 @@ namespace Meteor.Map.Actors | ||||
|  | ||||
|                 //33909: You attain level [level]. | ||||
|                 if (actionList != null) | ||||
|                     actionList.Add(new CommandResult(actorId, 33909, 0, (ushort)charaWork.battleSave.skillLevel[classId - 1])); | ||||
|                     actionList.Add(new CommandResult(Id, 33909, 0, (ushort)charaWork.battleSave.skillLevel[classId - 1])); | ||||
|  | ||||
|                 EquipAbilitiesAtLevel(classId, GetLevel(), actionList); | ||||
|             } | ||||
| @@ -2763,7 +2763,7 @@ namespace Meteor.Map.Actors | ||||
|         public void SetCurrentJob(byte jobId) | ||||
|         { | ||||
|             currentJob = jobId; | ||||
|             BroadcastPacket(SetCurrentJobPacket.BuildPacket(actorId, jobId), true); | ||||
|             BroadcastPacket(SetCurrentJobPacket.BuildPacket(Id, jobId), true); | ||||
|             Database.LoadHotbar(this); | ||||
|             SendCharaExpInfo(); | ||||
|         } | ||||
| @@ -2974,14 +2974,14 @@ namespace Meteor.Map.Actors | ||||
|         private void SendTradePackets() | ||||
|         { | ||||
|             //Send to self | ||||
|             QueuePacket(InventoryBeginChangePacket.BuildPacket(actorId, true)); | ||||
|             QueuePacket(InventoryBeginChangePacket.BuildPacket(Id, true)); | ||||
|             myOfferings.SendUpdate(this); | ||||
|             QueuePacket(InventoryEndChangePacket.BuildPacket(actorId)); | ||||
|             QueuePacket(InventoryEndChangePacket.BuildPacket(Id)); | ||||
|  | ||||
|             //Send to other trader | ||||
|             otherTrader.QueuePacket(InventoryBeginChangePacket.BuildPacket(actorId, true)); | ||||
|             otherTrader.QueuePacket(InventoryBeginChangePacket.BuildPacket(Id, true)); | ||||
|             myOfferings.SendUpdateAsItemPackage(otherTrader); | ||||
|             otherTrader.QueuePacket(InventoryEndChangePacket.BuildPacket(actorId)); | ||||
|             otherTrader.QueuePacket(InventoryEndChangePacket.BuildPacket(Id)); | ||||
|         } | ||||
|  | ||||
|         public void AcceptTrade(bool accepted) | ||||
| @@ -3003,9 +3003,9 @@ namespace Meteor.Map.Actors | ||||
|                         offeredItem.SetNormal(); | ||||
|                 } | ||||
|  | ||||
|                 QueuePacket(InventoryBeginChangePacket.BuildPacket(actorId, true)); | ||||
|                 QueuePacket(InventoryBeginChangePacket.BuildPacket(Id, true)); | ||||
|                 myOfferings.SendUpdate(this); | ||||
|                 QueuePacket(InventoryEndChangePacket.BuildPacket(actorId)); | ||||
|                 QueuePacket(InventoryEndChangePacket.BuildPacket(Id)); | ||||
|             } | ||||
|  | ||||
|             isTradeAccepted = false; | ||||
|   | ||||
| @@ -77,9 +77,9 @@ namespace Meteor.Map.actors.chara | ||||
|                 referenceList[positions[i]] = item; | ||||
|             } | ||||
|  | ||||
|             owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); | ||||
|             owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.Id)); | ||||
|             SendUpdate(); | ||||
|             owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); | ||||
|             owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.Id)); | ||||
|         } | ||||
|          | ||||
|         public void Set(ushort position, ushort itemPackagePosition, ushort itemPackageCode) | ||||
| @@ -114,12 +114,12 @@ namespace Meteor.Map.actors.chara | ||||
|  | ||||
|             referenceList[position] = item; | ||||
|  | ||||
|             owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); | ||||
|             owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.Id)); | ||||
|             if (oldPackage != null) | ||||
|                 oldPackage.SendUpdate(); | ||||
|             newPackage.SendUpdate(); | ||||
|             SendSingleUpdate(position); | ||||
|             owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId));             | ||||
|             owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.Id));             | ||||
|         } | ||||
|  | ||||
|         public void Clear(ushort position) | ||||
| @@ -135,10 +135,10 @@ namespace Meteor.Map.actors.chara | ||||
|             oldItemPackage.MarkDirty(referenceList[position]); | ||||
|             referenceList[position] = null; | ||||
|  | ||||
|             owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); | ||||
|             owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.Id)); | ||||
|             oldItemPackage.SendUpdate(); | ||||
|             SendSingleUpdate(position); | ||||
|             owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); | ||||
|             owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.Id)); | ||||
|         } | ||||
|  | ||||
|         public void ClearAll() | ||||
| @@ -160,20 +160,20 @@ namespace Meteor.Map.actors.chara | ||||
|                 referenceList[i] = null;                | ||||
|             } | ||||
|  | ||||
|             owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId)); | ||||
|             owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.Id)); | ||||
|             for (int i = 0; i < packagesToRefresh.Count; i++) | ||||
|                 packagesToRefresh[i].SendUpdate(); | ||||
|             SendUpdate(); | ||||
|             owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); | ||||
|             owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.Id)); | ||||
|         } | ||||
|         #endregion | ||||
|  | ||||
|         #region Send Update Functions | ||||
|         public void SendSingleUpdate(ushort position) | ||||
|         { | ||||
|             owner.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, itemPackageCapacity, itemPackageCode)); | ||||
|             owner.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.Id, itemPackageCapacity, itemPackageCode)); | ||||
|             SendSingleLinkedItemPacket(owner, position); | ||||
|             owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); | ||||
|             owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.Id)); | ||||
|         } | ||||
|  | ||||
|         public void SendUpdate() | ||||
| @@ -191,9 +191,9 @@ namespace Meteor.Map.actors.chara | ||||
|                     slotsToUpdate.Add(i); | ||||
|             } | ||||
|           | ||||
|             targetPlayer.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, itemPackageCapacity, itemPackageCode)); | ||||
|             targetPlayer.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.Id, itemPackageCapacity, itemPackageCode)); | ||||
|             SendLinkedItemPackets(targetPlayer, slotsToUpdate); | ||||
|             targetPlayer.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); | ||||
|             targetPlayer.QueuePacket(InventorySetEndPacket.BuildPacket(owner.Id)); | ||||
|         } | ||||
|  | ||||
|         public void SendUpdateAsItemPackage(Player targetPlayer) | ||||
| @@ -215,9 +215,9 @@ namespace Meteor.Map.actors.chara | ||||
|                 items.Add(referenceList[i]); | ||||
|             } | ||||
|              | ||||
|             targetPlayer.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, destinationCapacity, destinationCode));          | ||||
|             targetPlayer.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.Id, destinationCapacity, destinationCode));          | ||||
|             SendItemPackets(targetPlayer, items); | ||||
|             targetPlayer.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId)); | ||||
|             targetPlayer.QueuePacket(InventorySetEndPacket.BuildPacket(owner.Id)); | ||||
|  | ||||
|             //Clean Up linkSlots | ||||
|             for (ushort i = 0; i < referenceList.Length; i++) | ||||
| @@ -234,9 +234,9 @@ namespace Meteor.Map.actors.chara | ||||
|         private void SendSingleLinkedItemPacket(Player targetPlayer, ushort position) | ||||
|         { | ||||
|             if (referenceList[position] == null) | ||||
|                 targetPlayer.QueuePacket(InventoryRemoveX01Packet.BuildPacket(owner.actorId, position)); | ||||
|                 targetPlayer.QueuePacket(InventoryRemoveX01Packet.BuildPacket(owner.Id, position)); | ||||
|             else | ||||
|                 targetPlayer.QueuePacket(LinkedItemListX01Packet.BuildPacket(owner.actorId, position, referenceList[position])); | ||||
|                 targetPlayer.QueuePacket(LinkedItemListX01Packet.BuildPacket(owner.Id, position, referenceList[position])); | ||||
|         } | ||||
|  | ||||
|         private void SendLinkedItemPackets(Player targetPlayer, List<ushort> slotsToUpdate) | ||||
| @@ -246,16 +246,16 @@ namespace Meteor.Map.actors.chara | ||||
|             while (true) | ||||
|             { | ||||
|                 if (slotsToUpdate.Count - currentIndex >= 64) | ||||
|                     targetPlayer.QueuePacket(LinkedItemListX64Packet.BuildPacket(owner.actorId, referenceList, slotsToUpdate, ref currentIndex)); | ||||
|                     targetPlayer.QueuePacket(LinkedItemListX64Packet.BuildPacket(owner.Id, referenceList, slotsToUpdate, ref currentIndex)); | ||||
|                 else if (slotsToUpdate.Count - currentIndex >= 32) | ||||
|                     targetPlayer.QueuePacket(LinkedItemListX32Packet.BuildPacket(owner.actorId, referenceList, slotsToUpdate, ref currentIndex)); | ||||
|                     targetPlayer.QueuePacket(LinkedItemListX32Packet.BuildPacket(owner.Id, referenceList, slotsToUpdate, ref currentIndex)); | ||||
|                 else if (slotsToUpdate.Count - currentIndex >= 16) | ||||
|                     targetPlayer.QueuePacket(LinkedItemListX16Packet.BuildPacket(owner.actorId, referenceList, slotsToUpdate, ref currentIndex)); | ||||
|                     targetPlayer.QueuePacket(LinkedItemListX16Packet.BuildPacket(owner.Id, referenceList, slotsToUpdate, ref currentIndex)); | ||||
|                 else if (slotsToUpdate.Count - currentIndex > 1) | ||||
|                     targetPlayer.QueuePacket(LinkedItemListX08Packet.BuildPacket(owner.actorId, referenceList, slotsToUpdate, ref currentIndex)); | ||||
|                     targetPlayer.QueuePacket(LinkedItemListX08Packet.BuildPacket(owner.Id, referenceList, slotsToUpdate, ref currentIndex)); | ||||
|                 else if (slotsToUpdate.Count - currentIndex == 1) | ||||
|                 { | ||||
|                     targetPlayer.QueuePacket(LinkedItemListX01Packet.BuildPacket(owner.actorId, slotsToUpdate[currentIndex], referenceList[slotsToUpdate[currentIndex]])); | ||||
|                     targetPlayer.QueuePacket(LinkedItemListX01Packet.BuildPacket(owner.Id, slotsToUpdate[currentIndex], referenceList[slotsToUpdate[currentIndex]])); | ||||
|                     currentIndex++; | ||||
|                 } | ||||
|                 else | ||||
| @@ -270,16 +270,16 @@ namespace Meteor.Map.actors.chara | ||||
|             while (true) | ||||
|             { | ||||
|                 if (items.Count - currentIndex >= 64) | ||||
|                     player.QueuePacket(InventoryListX64Packet.BuildPacket(owner.actorId, items, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryListX64Packet.BuildPacket(owner.Id, items, ref currentIndex)); | ||||
|                 else if (items.Count - currentIndex >= 32) | ||||
|                     player.QueuePacket(InventoryListX32Packet.BuildPacket(owner.actorId, items, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryListX32Packet.BuildPacket(owner.Id, items, ref currentIndex)); | ||||
|                 else if (items.Count - currentIndex >= 16) | ||||
|                     player.QueuePacket(InventoryListX16Packet.BuildPacket(owner.actorId, items, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryListX16Packet.BuildPacket(owner.Id, items, ref currentIndex)); | ||||
|                 else if (items.Count - currentIndex > 1) | ||||
|                     player.QueuePacket(InventoryListX08Packet.BuildPacket(owner.actorId, items, ref currentIndex)); | ||||
|                     player.QueuePacket(InventoryListX08Packet.BuildPacket(owner.Id, items, ref currentIndex)); | ||||
|                 else if (items.Count - currentIndex == 1) | ||||
|                 { | ||||
|                     player.QueuePacket(InventoryListX01Packet.BuildPacket(owner.actorId, items[currentIndex])); | ||||
|                     player.QueuePacket(InventoryListX01Packet.BuildPacket(owner.Id, items[currentIndex])); | ||||
|                     currentIndex++; | ||||
|                 } | ||||
|                 else | ||||
|   | ||||
		Reference in New Issue
	
	Block a user