mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-31 06:46:13 +02:00
Refactored some actor field names
This commit is contained in:
parent
563118372a
commit
4e0cf36552
42 changed files with 462 additions and 462 deletions
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue