1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-24 13:47:46 +00:00

Refactored some actor field names

This commit is contained in:
Filip Maj 2022-02-05 17:48:49 -05:00
parent 563118372a
commit 4e0cf36552
42 changed files with 462 additions and 462 deletions

View file

@ -59,11 +59,11 @@ namespace Meteor.Map.Actors
class Actor
{
public static uint INVALID_ACTORID = 0xC0000000;
public uint actorId;
public string actorName;
public uint Id;
public string Name;
public int displayNameId = -1;
public string customDisplayName;
public int LocalizedDisplayName = -1;
public string DisplayName;
public ushort currentMainState = SetActorStatePacket.MAIN_STATE_PASSIVE;
@ -98,13 +98,13 @@ namespace Meteor.Map.Actors
public Actor(uint actorId)
{
this.actorId = actorId;
this.Id = actorId;
}
public Actor(uint actorId, string actorName, string className, List<LuaParam> classParams)
{
this.actorId = actorId;
this.actorName = actorName;
this.Id = actorId;
this.Name = actorName;
this.className = className;
this.classParams = classParams;
@ -143,17 +143,17 @@ namespace Meteor.Map.Actors
public SubPacket CreateAddActorPacket(byte val)
{
return AddActorPacket.BuildPacket(actorId, val);
return AddActorPacket.BuildPacket(Id, val);
}
public SubPacket CreateNamePacket()
{
return SetActorNamePacket.BuildPacket(actorId, customDisplayName != null ? 0 : displayNameId, displayNameId == 0xFFFFFFFF | displayNameId == 0x0 | customDisplayName != null ? customDisplayName : "");
return SetActorNamePacket.BuildPacket(Id, DisplayName != null ? 0 : LocalizedDisplayName, LocalizedDisplayName == 0xFFFFFFFF | LocalizedDisplayName == 0x0 | DisplayName != null ? DisplayName : "");
}
public SubPacket CreateSpeedPacket()
{
return SetActorSpeedPacket.BuildPacket(actorId, moveSpeeds[0], moveSpeeds[1], moveSpeeds[2], moveSpeeds[3]);
return SetActorSpeedPacket.BuildPacket(Id, moveSpeeds[0], moveSpeeds[1], moveSpeeds[2], moveSpeeds[3]);
}
public SubPacket CreateSpawnPositonPacket(ushort spawnType)
@ -164,18 +164,18 @@ namespace Meteor.Map.Actors
public SubPacket CreateSpawnPositonPacket(Player player, ushort spawnType)
{
//TODO: FIX THIS IF
uint playerActorId = player == null ? 0 : player.actorId; //Get Rid
uint playerActorId = player == null ? 0 : player.Id; //Get Rid
SubPacket spawnPacket;
if (!spawnedFirstTime && playerActorId == actorId)
spawnPacket = SetActorPositionPacket.BuildPacket(actorId, 0, positionX, positionY, positionZ, rotation, 0x1, false);
else if (playerActorId == actorId)
spawnPacket = SetActorPositionPacket.BuildPacket(actorId, 0xFFFFFFFF, positionX, positionY, positionZ, rotation, spawnType, true);
if (!spawnedFirstTime && playerActorId == Id)
spawnPacket = SetActorPositionPacket.BuildPacket(Id, 0, positionX, positionY, positionZ, rotation, 0x1, false);
else if (playerActorId == Id)
spawnPacket = SetActorPositionPacket.BuildPacket(Id, 0xFFFFFFFF, positionX, positionY, positionZ, rotation, spawnType, true);
else
{
if (this is Player)
spawnPacket = SetActorPositionPacket.BuildPacket(actorId, 0, positionX, positionY, positionZ, rotation, spawnType, false);
spawnPacket = SetActorPositionPacket.BuildPacket(Id, 0, positionX, positionY, positionZ, rotation, spawnType, false);
else
spawnPacket = SetActorPositionPacket.BuildPacket(actorId, actorId, positionX, positionY, positionZ, rotation, spawnType, false);
spawnPacket = SetActorPositionPacket.BuildPacket(Id, Id, positionX, positionY, positionZ, rotation, spawnType, false);
}
//return SetActorPositionPacket.BuildPacket(actorId, -211.895477f, 190.000000f, 29.651011f, 2.674819f, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE);
@ -188,7 +188,7 @@ namespace Meteor.Map.Actors
{
SubPacket spawnPacket;
spawnPacket = SetActorPositionPacket.BuildPacket(actorId, 0xFFFFFFFF, positionX, positionY, positionZ, rotation, spawnType, false);
spawnPacket = SetActorPositionPacket.BuildPacket(Id, 0xFFFFFFFF, positionX, positionY, positionZ, rotation, spawnType, false);
//return SetActorPositionPacket.BuildPacket(actorId, -211.895477f, 190.000000f, 29.651011f, 2.674819f, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE);
@ -199,12 +199,12 @@ namespace Meteor.Map.Actors
public SubPacket CreatePositionUpdatePacket()
{
return MoveActorToPositionPacket.BuildPacket(actorId, positionX, positionY, positionZ, rotation, moveState);
return MoveActorToPositionPacket.BuildPacket(Id, positionX, positionY, positionZ, rotation, moveState);
}
public SubPacket CreateStatePacket()
{
return SetActorStatePacket.BuildPacket(actorId, currentMainState, 0);
return SetActorStatePacket.BuildPacket(Id, currentMainState, 0);
}
public List<SubPacket> GetEventConditionPackets()
@ -218,37 +218,37 @@ namespace Meteor.Map.Actors
if (eventConditions.talkEventConditions != null)
{
foreach (EventList.TalkEventCondition condition in eventConditions.talkEventConditions)
subpackets.Add(SetTalkEventCondition.BuildPacket(actorId, condition));
subpackets.Add(SetTalkEventCondition.BuildPacket(Id, condition));
}
if (eventConditions.noticeEventConditions != null)
{
foreach (EventList.NoticeEventCondition condition in eventConditions.noticeEventConditions)
subpackets.Add(SetNoticeEventCondition.BuildPacket(actorId, condition));
subpackets.Add(SetNoticeEventCondition.BuildPacket(Id, condition));
}
if (eventConditions.emoteEventConditions != null)
{
foreach (EventList.EmoteEventCondition condition in eventConditions.emoteEventConditions)
subpackets.Add(SetEmoteEventCondition.BuildPacket(actorId, condition));
subpackets.Add(SetEmoteEventCondition.BuildPacket(Id, condition));
}
if (eventConditions.pushWithCircleEventConditions != null)
{
foreach (EventList.PushCircleEventCondition condition in eventConditions.pushWithCircleEventConditions)
subpackets.Add(SetPushEventConditionWithCircle.BuildPacket(actorId, condition));
subpackets.Add(SetPushEventConditionWithCircle.BuildPacket(Id, condition));
}
if (eventConditions.pushWithFanEventConditions != null)
{
foreach (EventList.PushFanEventCondition condition in eventConditions.pushWithFanEventConditions)
subpackets.Add(SetPushEventConditionWithFan.BuildPacket(actorId, condition));
subpackets.Add(SetPushEventConditionWithFan.BuildPacket(Id, condition));
}
if (eventConditions.pushWithBoxEventConditions != null)
{
foreach (EventList.PushBoxEventCondition condition in eventConditions.pushWithBoxEventConditions)
subpackets.Add(SetPushEventConditionWithTriggerBox.BuildPacket(actorId, condition));
subpackets.Add(SetPushEventConditionWithTriggerBox.BuildPacket(Id, condition));
}
return subpackets;
@ -265,37 +265,37 @@ namespace Meteor.Map.Actors
if (eventConditions.talkEventConditions != null)
{
foreach (EventList.TalkEventCondition condition in eventConditions.talkEventConditions)
subpackets.Add(SetEventStatusPacket.BuildPacket(actorId, talkEnabled, 1, condition.conditionName));
subpackets.Add(SetEventStatusPacket.BuildPacket(Id, talkEnabled, 1, condition.conditionName));
}
if (eventConditions.noticeEventConditions != null)
{
foreach (EventList.NoticeEventCondition condition in eventConditions.noticeEventConditions)
subpackets.Add(SetEventStatusPacket.BuildPacket(actorId, noticeEnabled, 5, condition.conditionName));
subpackets.Add(SetEventStatusPacket.BuildPacket(Id, noticeEnabled, 5, condition.conditionName));
}
if (eventConditions.emoteEventConditions != null)
{
foreach (EventList.EmoteEventCondition condition in eventConditions.emoteEventConditions)
subpackets.Add(SetEventStatusPacket.BuildPacket(actorId, emoteEnabled, 3, condition.conditionName));
subpackets.Add(SetEventStatusPacket.BuildPacket(Id, emoteEnabled, 3, condition.conditionName));
}
if (eventConditions.pushWithCircleEventConditions != null)
{
foreach (EventList.PushCircleEventCondition condition in eventConditions.pushWithCircleEventConditions)
subpackets.Add(SetEventStatusPacket.BuildPacket(actorId, pushEnabled, 2, condition.conditionName));
subpackets.Add(SetEventStatusPacket.BuildPacket(Id, pushEnabled, 2, condition.conditionName));
}
if (eventConditions.pushWithFanEventConditions != null)
{
foreach (EventList.PushFanEventCondition condition in eventConditions.pushWithFanEventConditions)
subpackets.Add(SetEventStatusPacket.BuildPacket(actorId, pushEnabled, 2, condition.conditionName));
subpackets.Add(SetEventStatusPacket.BuildPacket(Id, pushEnabled, 2, condition.conditionName));
}
if (eventConditions.pushWithBoxEventConditions != null)
{
foreach (EventList.PushBoxEventCondition condition in eventConditions.pushWithBoxEventConditions)
subpackets.Add(SetEventStatusPacket.BuildPacket(actorId, pushEnabled, 2, condition.conditionName));
subpackets.Add(SetEventStatusPacket.BuildPacket(Id, pushEnabled, 2, condition.conditionName));
}
return subpackets;
@ -303,17 +303,17 @@ namespace Meteor.Map.Actors
public SubPacket CreateIsZoneingPacket()
{
return SetActorIsZoningPacket.BuildPacket(actorId, false);
return SetActorIsZoningPacket.BuildPacket(Id, false);
}
public virtual SubPacket CreateScriptBindPacket(Player player)
{
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, classParams);
return ActorInstantiatePacket.BuildPacket(Id, Name, className, classParams);
}
public virtual SubPacket CreateScriptBindPacket()
{
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, classParams);
return ActorInstantiatePacket.BuildPacket(Id, Name, className, classParams);
}
public virtual List<SubPacket> GetSpawnPackets(Player player, ushort spawnType)
@ -357,7 +357,7 @@ namespace Meteor.Map.Actors
initProperties.AddByte(0x2138FD71, 1);
initProperties.AddByte(0xFBFBCFB1, 1);
initProperties.AddTarget();
packets.Add(initProperties.BuildPacket(actorId));
packets.Add(initProperties.BuildPacket(Id));
return packets;
}
@ -367,12 +367,12 @@ namespace Meteor.Map.Actors
if (actorObj == null)
return false;
else
return actorId == actorObj.actorId;
return Id == actorObj.Id;
}
public string GetName()
{
return actorName;
return Name;
}
public string GetClassName()
@ -473,22 +473,22 @@ namespace Meteor.Map.Actors
if ((updateFlags & ActorUpdateFlags.Speed) != 0)
{
packets.Add(SetActorSpeedPacket.BuildPacket(actorId, moveSpeeds[0], moveSpeeds[1], moveSpeeds[2], moveSpeeds[3]));
packets.Add(SetActorSpeedPacket.BuildPacket(Id, moveSpeeds[0], moveSpeeds[1], moveSpeeds[2], moveSpeeds[3]));
}
if ((updateFlags & ActorUpdateFlags.Name) != 0)
{
packets.Add(SetActorNamePacket.BuildPacket(actorId, displayNameId, customDisplayName));
packets.Add(SetActorNamePacket.BuildPacket(Id, LocalizedDisplayName, DisplayName));
}
if ((updateFlags & ActorUpdateFlags.State) != 0)
{
packets.Add(SetActorStatePacket.BuildPacket(actorId, currentMainState, 0x3B));
packets.Add(SetActorStatePacket.BuildPacket(Id, currentMainState, 0x3B));
}
if ((updateFlags & ActorUpdateFlags.SubState) != 0)
{
packets.Add(SetActorSubStatePacket.BuildPacket(actorId, currentSubState));
packets.Add(SetActorSubStatePacket.BuildPacket(Id, currentSubState));
}
updateFlags = ActorUpdateFlags.None;
@ -538,7 +538,7 @@ namespace Meteor.Map.Actors
uint zoneId = CurrentArea.ZoneId;
int privLevel = CurrentArea.GetPrivateAreaType();
actorName = String.Format("{0}_{1}_{2}@{3:X3}{4:X2}", className, zoneName, classNumber, zoneId, privLevel);
Name = String.Format("{0}_{1}_{2}@{3:X3}{4:X2}", className, zoneName, classNumber, zoneId, privLevel);
}
public bool SetWorkValue(Player player, string name, string uiFunc, object value)
@ -594,7 +594,7 @@ namespace Meteor.Map.Actors
SetActorPropetyPacket changeProperty = new SetActorPropetyPacket(uiFunc);
changeProperty.AddProperty(this, name);
changeProperty.AddTarget();
SubPacket subpacket = changeProperty.BuildPacket(player.actorId);
SubPacket subpacket = changeProperty.BuildPacket(player.Id);
player.playerSession.QueuePacket(subpacket);
subpacket.DebugPrintSubPacket();
return true;
@ -612,7 +612,7 @@ namespace Meteor.Map.Actors
SetActorPropetyPacket changeProperty = new SetActorPropetyPacket(uiFunc);
changeProperty.AddProperty(this, name);
changeProperty.AddTarget();
SubPacket subpacket = changeProperty.BuildPacket(player.actorId);
SubPacket subpacket = changeProperty.BuildPacket(player.Id);
player.playerSession.QueuePacket(subpacket);
subpacket.DebugPrintSubPacket();
return true;
@ -655,7 +655,7 @@ namespace Meteor.Map.Actors
rotation = rot;
// todo: handle zone?
CurrentArea.BroadcastPacketAroundActor(this, MoveActorToPositionPacket.BuildPacket(actorId, x, y, z, rot, moveState));
CurrentArea.BroadcastPacketAroundActor(this, MoveActorToPositionPacket.BuildPacket(Id, x, y, z, rot, moveState));
}
public void LookAt(Actor actor)
@ -666,7 +666,7 @@ namespace Meteor.Map.Actors
}
else
{
Program.Log.Error("[{0}][{1}] Actor.LookAt() unable to find actor!", actorId, actorName);
Program.Log.Error("[{0}][{1}] Actor.LookAt() unable to find actor!", Id, Name);
}
}
@ -708,7 +708,7 @@ namespace Meteor.Map.Actors
{
if (target == null)
{
Program.Log.Error("[{0}][{1}] IsFacing no target!", actorId, actorName);
Program.Log.Error("[{0}][{1}] IsFacing no target!", Id, Name);
return false;
}
@ -746,7 +746,7 @@ namespace Meteor.Map.Actors
{
if (target == null)
{
Program.Log.Error(String.Format("[{0} {1}] FindRandomPointAroundTarget: no target found!", this.actorId, this.customDisplayName));
Program.Log.Error(String.Format("[{0} {1}] FindRandomPointAroundTarget: no target found!", this.Id, this.DisplayName));
return GetPosAsVector3();
}
return FindRandomPoint(target.positionX, target.positionY, target.positionZ, minRadius, maxRadius);
@ -762,11 +762,11 @@ namespace Meteor.Map.Actors
{
if (className != null)
{
return string.Format("{0} [0x{1:X}]", className, actorId);
return string.Format("{0} [0x{1:X}]", className, Id);
}
else
{
return string.Format("Unknown [0x{0:X}]", actorId);
return string.Format("Unknown [0x{0:X}]", Id);
}
}
}

View file

@ -77,9 +77,9 @@ namespace Meteor.Map.Actors
this.bgmNight = bgmNight;
this.bgmBattle = bgmBattle;
this.displayNameId = 0;
this.customDisplayName = "_areaMaster";
this.actorName = String.Format("_areaMaster@{0:X5}", zoneId << 8);
this.LocalizedDisplayName = 0;
this.DisplayName = "_areaMaster";
this.Name = String.Format("_areaMaster@{0:X5}", zoneId << 8);
this.classPath = classPath;
this.className = classPath.Substring(classPath.LastIndexOf("/") + 1);
@ -113,7 +113,7 @@ namespace Meteor.Map.Actors
{
List<LuaParam> lParams;
lParams = LuaUtils.CreateLuaParamList(classPath, false, true, ZoneName, "/Area/Zone/ZoneDefault", -1, (byte)1, true, false, false, false, false, false, false, false);
return ActorInstantiatePacket.BuildPacket(actorId, actorName, "ZoneDefault", lParams);
return ActorInstantiatePacket.BuildPacket(Id, Name, "ZoneDefault", lParams);
}
public override List<SubPacket> GetSpawnPackets()
@ -139,8 +139,8 @@ namespace Meteor.Map.Actors
if (actor is Character)
((Character)actor).ResetTempVars();
if (!mActorList.ContainsKey(actor.actorId))
mActorList.Add(actor.actorId, actor);
if (!mActorList.ContainsKey(actor.Id))
mActorList.Add(actor.Id, actor);
int gridX = (int)actor.positionX / boundingGridSize;
@ -169,7 +169,7 @@ namespace Meteor.Map.Actors
if (actor != null)
lock (mActorList)
{
mActorList.Remove(actor.actorId);
mActorList.Remove(actor.Id);
int gridX = (int)actor.positionX / boundingGridSize;
int gridY = (int)actor.positionZ / boundingGridSize;
@ -377,7 +377,7 @@ namespace Meteor.Map.Actors
{
foreach (Player player in mActorList.Values.OfType<Player>())
{
if (player.customDisplayName.ToLower().Equals(name.ToLower()))
if (player.DisplayName.ToLower().Equals(name.ToLower()))
return player;
}
return null;
@ -471,7 +471,7 @@ namespace Meteor.Map.Actors
if (isIsolated)
continue;
SubPacket clonedPacket = new SubPacket(packet, a.actorId);
SubPacket clonedPacket = new SubPacket(packet, a.Id);
Player p = (Player)a;
p.QueuePacket(clonedPacket);
}
@ -490,9 +490,9 @@ namespace Meteor.Map.Actors
uint zoneId;
if (this is PrivateArea)
zoneId = ((PrivateArea)this).GetParentZone().actorId;
zoneId = ((PrivateArea)this).GetParentZone().Id;
else
zoneId = actorId;
zoneId = Id;
Npc npc = new Npc(mActorList.Count + 1, actorClass, location.uniqueId, this, location.x, location.y, location.z, location.rot, location.state, location.animId, null);
@ -514,9 +514,9 @@ namespace Meteor.Map.Actors
uint zoneId;
if (this is PrivateArea)
zoneId = ((PrivateArea)this).GetParentZone().actorId;
zoneId = ((PrivateArea)this).GetParentZone().Id;
else
zoneId = actorId;
zoneId = Id;
Npc npc;
if (isMob)
@ -547,9 +547,9 @@ namespace Meteor.Map.Actors
uint zoneId;
if (this is PrivateArea)
zoneId = ((PrivateArea)this).GetParentZone().actorId;
zoneId = ((PrivateArea)this).GetParentZone().Id;
else
zoneId = actorId;
zoneId = Id;
Npc npc = new Npc(mActorList.Count + 1, actorClass, uniqueId, this, x, y, z, 0, regionId, layoutId);
@ -592,7 +592,7 @@ namespace Meteor.Map.Actors
if (player != null && !zoneWide)
{
player.QueuePacket(SetWeatherPacket.BuildPacket(player.actorId, weather, transitionTime));
player.QueuePacket(SetWeatherPacket.BuildPacket(player.Id, weather, transitionTime));
}
if (zoneWide)
{
@ -603,7 +603,7 @@ namespace Meteor.Map.Actors
if (actor.Value is Player)
{
player = ((Player)actor.Value);
player.QueuePacket(SetWeatherPacket.BuildPacket(player.actorId, weather, transitionTime));
player.QueuePacket(SetWeatherPacket.BuildPacket(player.Id, weather, transitionTime));
}
}
}
@ -615,7 +615,7 @@ namespace Meteor.Map.Actors
lock (directorLock)
{
Director director = new Director(directorIdCount, this, path, hasContentGroup, args);
currentDirectors.Add(director.actorId, director);
currentDirectors.Add(director.Id, director);
directorIdCount++;
return director;
}
@ -663,7 +663,7 @@ namespace Meteor.Map.Actors
lock (directorLock)
{
GuildleveDirector director = new GuildleveDirector(directorIdCount, this, directorScriptPath, glid, difficulty, owner, args);
currentDirectors.Add(director.actorId, director);
currentDirectors.Add(director.Id, director);
directorIdCount++;
return director;
}

View file

@ -66,8 +66,8 @@ namespace Meteor.Map.actors.area
string realClassName = className.Substring(className.LastIndexOf("/") + 1);
lParams = LuaUtils.CreateLuaParamList(classPath, false, true, ZoneName, PrivateAreaName, PrivateAreaType, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, false, false, false);
ActorInstantiatePacket.BuildPacket(actorId, actorName, realClassName, lParams).DebugPrintSubPacket();
return ActorInstantiatePacket.BuildPacket(actorId, actorName, realClassName, lParams);
ActorInstantiatePacket.BuildPacket(Id, Name, realClassName, lParams).DebugPrintSubPacket();
return ActorInstantiatePacket.BuildPacket(Id, Name, realClassName, lParams);
}

View file

@ -95,7 +95,7 @@ namespace Meteor.Map.actors.area
List<LuaParam> lParams;
lParams = LuaUtils.CreateLuaParamList(classPath, false, true, ZoneName, "", -1, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, true, isInstanceRaid, isEntranceDesion);
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams);
return ActorInstantiatePacket.BuildPacket(Id, Name, className, lParams);
}
public void AddSpawnLocation(SpawnLocation spawn)

View file

@ -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;
}

View file

@ -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));

View file

@ -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
{

View file

@ -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));
}
}
}

View file

@ -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())

View file

@ -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;

View file

@ -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));
}
}
}

View file

@ -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);
}
}
}

View file

@ -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);

View file

@ -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))
{

View file

@ -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

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);

View file

@ -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,15 +912,15 @@ namespace Meteor.Map.Actors
public void ChangeMusic(ushort musicId)
{
QueuePacket(SetMusicPacket.BuildPacket(actorId, musicId, 1));
QueuePacket(SetMusicPacket.BuildPacket(Id, musicId, 1));
}
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)
@ -936,41 +936,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)
@ -1097,7 +1097,7 @@ namespace Meteor.Map.Actors
charaInfo1.AddTarget();
QueuePacket(charaInfo1.BuildPacket(actorId));
QueuePacket(charaInfo1.BuildPacket(Id));
}
else if (lastStep == 1)
{
@ -1128,7 +1128,7 @@ namespace Meteor.Map.Actors
charaInfo1.AddTarget();
QueuePacket(charaInfo1.BuildPacket(actorId));
QueuePacket(charaInfo1.BuildPacket(Id));
}
}
@ -1316,7 +1316,7 @@ namespace Meteor.Map.Actors
{
foreach (Actor a in playerSession.actorInstanceList)
{
if (a.actorId == actorId)
if (a.Id == actorId)
return a;
}
@ -1471,7 +1471,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)
@ -1486,7 +1486,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);
@ -1500,7 +1500,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)
@ -1510,7 +1510,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);
@ -1538,9 +1538,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);
@ -1580,13 +1580,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)
@ -1598,7 +1598,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];
}
@ -1609,7 +1609,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];
}
@ -1620,7 +1620,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;
}
@ -1631,7 +1631,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;
}
@ -1653,7 +1653,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;
}
@ -1826,7 +1826,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);
}
@ -1858,7 +1858,7 @@ namespace Meteor.Map.Actors
{
foreach (Director d in ownedDirectors)
{
if (d.actorId == id)
if (d.Id == id)
return d;
}
@ -1873,15 +1873,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);
}
@ -1905,7 +1905,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);
}
@ -1916,27 +1916,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);
@ -1948,7 +1948,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)
@ -1975,7 +1975,7 @@ namespace Meteor.Map.Actors
if (IsInParty())
{
Party party = (Party)currentParty;
return party.GetLeader() == actorId;
return party.GetLeader() == Id;
}
else
return false;
@ -2037,7 +2037,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;
@ -2058,8 +2058,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)
@ -2463,7 +2463,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)
@ -2478,7 +2478,7 @@ namespace Meteor.Map.Actors
}
}
}
else if (target.currentLockedTarget == actorId)
else if (target.currentLockedTarget == Id)
{
partyEngaged = true;
}
@ -2650,7 +2650,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];
@ -2706,7 +2706,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));
}
}
}
@ -2722,7 +2722,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);
}
@ -2755,7 +2755,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();
}
@ -2966,14 +2966,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)
@ -2995,9 +2995,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;

View file

@ -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

View file

@ -26,7 +26,7 @@ namespace Meteor.Map.Actors
public Command(uint actorID, string name) : base(actorID)
{
actorName = name;
Name = name;
}
}

View file

@ -32,10 +32,10 @@ namespace Meteor.Map.Actors
public DebugProg()
: base(0x5FF80002)
{
this.displayNameId = 0;
this.customDisplayName = "debug";
this.LocalizedDisplayName = 0;
this.DisplayName = "debug";
this.actorName = "debug";
this.Name = "debug";
this.className = "Debug";
}
@ -43,7 +43,7 @@ namespace Meteor.Map.Actors
{
List<LuaParam> lParams;
lParams = LuaUtils.CreateLuaParamList("/System/Debug.prog", false, false, false, false, true, 0xC51F, true, true);
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams);
return ActorInstantiatePacket.BuildPacket(Id, Name, className, lParams);
}
public override List<SubPacket> GetSpawnPackets()

View file

@ -78,7 +78,7 @@ namespace Meteor.Map.actors.director
for (int i = 1; i < lparams.Count; i++)
actualLParams.Add(lparams[i]);
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, actualLParams);
return ActorInstantiatePacket.BuildPacket(Id, Name, className, actualLParams);
}
public override List<SubPacket> GetSpawnPackets(ushort spawnType = 1)
@ -100,7 +100,7 @@ namespace Meteor.Map.actors.director
List<SubPacket> subpackets = new List<SubPacket>();
SetActorPropetyPacket initProperties = new SetActorPropetyPacket("/_init");
initProperties.AddTarget();
subpackets.Add(initProperties.BuildPacket(actorId));
subpackets.Add(initProperties.BuildPacket(Id));
return subpackets;
}
@ -171,7 +171,7 @@ namespace Meteor.Map.actors.director
((Player)player).RemoveDirector(this);
members.Clear();
isDeleted = true;
Server.GetWorldManager().GetArea(CurrentArea.ZoneId).DeleteDirector(actorId);
Server.GetWorldManager().GetArea(CurrentArea.ZoneId).DeleteDirector(Id);
}
public void AddMember(Actor actor)
@ -193,7 +193,7 @@ namespace Meteor.Map.actors.director
if (members.Contains(actor))
members.Remove(actor);
if (contentGroup != null)
contentGroup.RemoveMember(actor.actorId);
contentGroup.RemoveMember(actor.Id);
if (GetPlayerMembers().Count == 0 && !isDeleting)
EndDirector();
}
@ -270,7 +270,7 @@ namespace Meteor.Map.actors.director
uint zoneId = CurrentArea.ZoneId;
int privLevel = CurrentArea.GetPrivateAreaType();
actorName = String.Format("{0}_{1}_{2}@{3:X3}{4:X2}", className, zoneName, classNumber, zoneId, privLevel);
Name = String.Format("{0}_{1}_{2}@{3:X3}{4:X2}", className, zoneName, classNumber, zoneId, privLevel);
}
public string GetScriptPath()

View file

@ -137,7 +137,7 @@ namespace Meteor.Map.actors.director
if (wasCompleted)
{
Npc aetheryteNode = CurrentArea.SpawnActor(1200040, String.Format("{0}:warpExit", guildleveOwner.actorName), guildleveOwner.positionX, guildleveOwner.positionY, guildleveOwner.positionZ);
Npc aetheryteNode = CurrentArea.SpawnActor(1200040, String.Format("{0}:warpExit", guildleveOwner.Name), guildleveOwner.positionX, guildleveOwner.positionY, guildleveOwner.positionZ);
AddMember(aetheryteNode);
foreach (Actor a in GetPlayerMembers())

View file

@ -52,7 +52,7 @@ namespace Meteor.Map.actors.group
}
this.director = director;
contentGroupWork._globalTemp.director = (ulong)director.actorId << 32;
contentGroupWork._globalTemp.director = (ulong)director.Id << 32;
}
public void Start()
@ -67,8 +67,8 @@ namespace Meteor.Map.actors.group
if (actor == null)
return;
if(!members.Contains(actor.actorId))
members.Add(actor.actorId);
if(!members.Contains(actor.Id))
members.Add(actor.Id);
if (actor is Character)
((Character)actor).SetCurrentContentGroup(this);

View file

@ -54,11 +54,11 @@ namespace Meteor.Map.actors.group
public override List<GroupMember> BuildMemberList(uint id)
{
List<GroupMember> groupMembers = new List<GroupMember>();
groupMembers.Add(new GroupMember(id, -1, 0, false, true, Server.GetWorldManager().GetActorInWorld(id).customDisplayName));
groupMembers.Add(new GroupMember(id, -1, 0, false, true, Server.GetWorldManager().GetActorInWorld(id).DisplayName));
foreach (uint charaId in monsterMembers)
{
if (charaId != id)
groupMembers.Add(new GroupMember(charaId, -1, 0, false, true, Server.GetWorldManager().GetActorInWorld(charaId).customDisplayName));
groupMembers.Add(new GroupMember(charaId, -1, 0, false, true, Server.GetWorldManager().GetActorInWorld(charaId).DisplayName));
}
return groupMembers;
}

View file

@ -50,7 +50,7 @@ namespace Meteor.Map.actors.group
{
for (int i = 0; i < members.Count; i++)
{
if (Server.GetWorldManager().GetActorInWorld(members[i]).customDisplayName.Equals(name))
if (Server.GetWorldManager().GetActorInWorld(members[i]).DisplayName.Equals(name))
{
return members[i];
}
@ -76,12 +76,12 @@ namespace Meteor.Map.actors.group
public override List<GroupMember> BuildMemberList(uint id)
{
List<GroupMember> groupMembers = new List<GroupMember>();
groupMembers.Add(new GroupMember(id, -1, 0, false, true, Server.GetWorldManager().GetActorInWorld(id).customDisplayName));
groupMembers.Add(new GroupMember(id, -1, 0, false, true, Server.GetWorldManager().GetActorInWorld(id).DisplayName));
foreach (uint charaId in members)
{
var chara = Server.GetWorldManager().GetActorInWorld(charaId);
if (charaId != id && chara != null)
groupMembers.Add(new GroupMember(charaId, -1, 0, false, true, chara.customDisplayName));
groupMembers.Add(new GroupMember(charaId, -1, 0, false, true, chara.DisplayName));
}
return groupMembers;
}

View file

@ -73,8 +73,8 @@ namespace Meteor.Map.actors.group
uint hostId = (uint)((work._globalTemp.host >> 32) & 0xFFFFFFFF);
groupMembers.Add(new GroupMember(hostId, -1, 0, false, Server.GetServer().GetSession(hostId) != null, Server.GetWorldManager().GetActorInWorld(hostId).customDisplayName));
groupMembers.Add(new GroupMember(charaOther, -1, 0, false, Server.GetServer().GetSession(charaOther) != null, Server.GetWorldManager().GetActorInWorld(charaOther).customDisplayName));
groupMembers.Add(new GroupMember(hostId, -1, 0, false, Server.GetServer().GetSession(hostId) != null, Server.GetWorldManager().GetActorInWorld(hostId).DisplayName));
groupMembers.Add(new GroupMember(charaOther, -1, 0, false, Server.GetServer().GetSession(charaOther) != null, Server.GetWorldManager().GetActorInWorld(charaOther).DisplayName));
return groupMembers;
}

View file

@ -50,8 +50,8 @@ namespace Meteor.Map.actors.group
{
List<GroupMember> groupMembers = new List<GroupMember>();
groupMembers.Add(new GroupMember(player.actorId, -1, 0x83, false, true, player.customDisplayName));
groupMembers.Add(new GroupMember(retainer.actorId, -1, 0x83, false, true, retainer.customDisplayName));
groupMembers.Add(new GroupMember(player.Id, -1, 0x83, false, true, player.DisplayName));
groupMembers.Add(new GroupMember(retainer.Id, -1, 0x83, false, true, retainer.DisplayName));
return groupMembers;
}

View file

@ -73,8 +73,8 @@ namespace Meteor.Map.actors.group
uint hostId = (uint)((work._globalTemp.host >> 32) & 0xFFFFFFFF);
groupMembers.Add(new GroupMember(hostId, -1, 0, false, Server.GetServer().GetSession(hostId) != null, Server.GetWorldManager().GetActorInWorld(hostId).customDisplayName));
groupMembers.Add(new GroupMember(charaOther, -1, 0, false, Server.GetServer().GetSession(charaOther) != null, Server.GetWorldManager().GetActorInWorld(charaOther).customDisplayName));
groupMembers.Add(new GroupMember(hostId, -1, 0, false, Server.GetServer().GetSession(hostId) != null, Server.GetWorldManager().GetActorInWorld(hostId).DisplayName));
groupMembers.Add(new GroupMember(charaOther, -1, 0, false, Server.GetServer().GetSession(charaOther) != null, Server.GetWorldManager().GetActorInWorld(charaOther).DisplayName));
return groupMembers;
}

View file

@ -25,7 +25,7 @@ namespace Meteor.Map.Actors
{
public Judge(uint actorID, string name) : base(actorID)
{
actorName = name;
Name = name;
}
}
}

View file

@ -309,17 +309,17 @@ namespace Meteor.Map.Actors
public Quest(uint actorID, string name)
: base(actorID)
{
actorName = name;
Name = name;
}
public Quest(Player owner, Quest baseQuest): this(owner, baseQuest, SEQ_NOT_STARTED, 0, 0, 0, 0)
{}
public Quest(Player owner, Quest baseQuest, ushort sequence, uint flags, ushort counter1, ushort counter2, ushort counter3)
: base(baseQuest.actorId)
: base(baseQuest.Id)
{
Owner = owner;
actorName = baseQuest.actorName;
Name = baseQuest.Name;
className = baseQuest.className;
classPath = baseQuest.classPath;
currentSequence = sequence;
@ -333,7 +333,7 @@ namespace Meteor.Map.Actors
public uint GetQuestId()
{
return actorId & 0xFFFFF;
return Id & 0xFFFFF;
}
public void DoComplete()

View file

@ -133,7 +133,7 @@ namespace Meteor.Map.Actors
{
foreach (Actor a in mStaticActors.Values)
{
if (a.actorName.Equals(name))
if (a.Name.Equals(name))
return a;
}

View file

@ -31,10 +31,10 @@ namespace Meteor.Map.Actors
{
public WorldMaster() : base(0x5FF80001)
{
this.displayNameId = 0;
this.customDisplayName = "worldMaster";
this.LocalizedDisplayName = 0;
this.DisplayName = "worldMaster";
this.actorName = "worldMaster";
this.Name = "worldMaster";
this.className = "WorldMaster";
}
@ -42,7 +42,7 @@ namespace Meteor.Map.Actors
{
List<LuaParam> lParams;
lParams = LuaUtils.CreateLuaParamList("/World/WorldMaster_event", false, false, false, false, false, null);
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams);
return ActorInstantiatePacket.BuildPacket(Id, Name, className, lParams);
}
public override List<SubPacket> GetSpawnPackets()

View file

@ -119,12 +119,12 @@ namespace Meteor.Map.dataobjects
//Retainer Instance
if (actorInstanceList[i] is Retainer && playerActor.currentSpawnedRetainer == null)
{
QueuePacket(RemoveActorPacket.BuildPacket(actorInstanceList[i].actorId));
QueuePacket(RemoveActorPacket.BuildPacket(actorInstanceList[i].Id));
actorInstanceList.RemoveAt(i);
}
else if (!list.Contains(actorInstanceList[i]) && !(actorInstanceList[i] is Retainer))
{
QueuePacket(RemoveActorPacket.BuildPacket(actorInstanceList[i].actorId));
QueuePacket(RemoveActorPacket.BuildPacket(actorInstanceList[i].Id));
actorInstanceList.RemoveAt(i);
}
}
@ -146,7 +146,7 @@ namespace Meteor.Map.dataobjects
{
Actor actor = list[i];
if (actor.actorId == playerActor.actorId)
if (actor.Id == playerActor.Id)
continue;
if (actorInstanceList.Contains(actor))
@ -169,7 +169,7 @@ namespace Meteor.Map.dataobjects
{
ENpcQuestInstance questInstance = quests[0].GetENpcInstance(npc.GetActorClassId());
QueuePacket(npc.GetSetEventStatusPackets());
QueuePacket(SetActorQuestGraphicPacket.BuildPacket(npc.actorId, questInstance.questFlagType));
QueuePacket(SetActorQuestGraphicPacket.BuildPacket(npc.Id, questInstance.questFlagType));
}
}
@ -188,12 +188,12 @@ namespace Meteor.Map.dataobjects
if (!clearInstance)
{
QueuePacket(actor.GetSetEventStatusPackets(questInstance.isTalkEnabled, questInstance.isEmoteEnabled, questInstance.isPushEnabled));
QueuePacket(SetActorQuestGraphicPacket.BuildPacket(actor.actorId, questInstance.questFlagType));
QueuePacket(SetActorQuestGraphicPacket.BuildPacket(actor.Id, questInstance.questFlagType));
}
else
{
QueuePacket(actor.GetSetEventStatusPackets());
QueuePacket(SetActorQuestGraphicPacket.BuildPacket(actor.actorId, 0));
QueuePacket(SetActorQuestGraphicPacket.BuildPacket(actor.Id, 0));
}
}
LockUpdates(false);

View file

@ -293,7 +293,7 @@ namespace Meteor.Map
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@charaId", player.Id);
cmd.Parameters.AddWithValue("@mainHand", player.appearanceIds[Character.MAINHAND]);
cmd.Parameters.AddWithValue("@offHand", player.appearanceIds[Character.OFFHAND]);
cmd.Parameters.AddWithValue("@head", player.appearanceIds[Character.HEADGEAR]);
@ -340,7 +340,7 @@ namespace Meteor.Map
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@charaId", player.Id);
cmd.Parameters.AddWithValue("@classId", player.charaWork.parameterSave.state_mainSkill[0]);
cmd.Parameters.AddWithValue("@classLevel", player.charaWork.parameterSave.state_mainSkillLevel);
@ -383,7 +383,7 @@ namespace Meteor.Map
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@charaId", player.Id);
cmd.Parameters.AddWithValue("@x", player.positionX);
cmd.Parameters.AddWithValue("@y", player.positionY);
cmd.Parameters.AddWithValue("@z", player.positionZ);
@ -425,7 +425,7 @@ namespace Meteor.Map
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@charaId", player.Id);
cmd.Parameters.AddWithValue("@playtime", player.GetPlayTime(true));
cmd.ExecuteNonQuery();
@ -460,7 +460,7 @@ namespace Meteor.Map
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@charaId", player.Id);
cmd.Parameters.AddWithValue("@homepoint", player.homepoint);
cmd.Parameters.AddWithValue("@homepointInn", player.homepointInn);
@ -479,10 +479,10 @@ namespace Meteor.Map
public static void SaveQuest(Player player, Quest quest)
{
int slot = player.GetQuestSlot(quest.actorId);
int slot = player.GetQuestSlot(quest.Id);
if (slot == -1)
{
Program.Log.Error("Tried saving quest player didn't have: Player: {0:x}, QuestId: {0:x}", player.actorId, quest.actorId);
Program.Log.Error("Tried saving quest player didn't have: Player: {0:x}, QuestId: {0:x}", player.Id, quest.Id);
return;
}
else
@ -510,9 +510,9 @@ namespace Meteor.Map
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@charaId", player.Id);
cmd.Parameters.AddWithValue("@slot", slot);
cmd.Parameters.AddWithValue("@questId", 0xFFFFF & quest.actorId);
cmd.Parameters.AddWithValue("@questId", 0xFFFFF & quest.Id);
cmd.Parameters.AddWithValue("@sequence", quest.GetSequence());
cmd.Parameters.AddWithValue("@flags", quest.GetFlags());
cmd.Parameters.AddWithValue("@counter1", quest.GetCounter(1));
@ -550,7 +550,7 @@ namespace Meteor.Map
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@charaId", player.Id);
cmd.Parameters.AddWithValue("@guildleveId", glId);
cmd.Parameters.AddWithValue("@abandoned", isAbandoned);
cmd.Parameters.AddWithValue("@completed", isCompleted);
@ -589,7 +589,7 @@ namespace Meteor.Map
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@charaId", player.Id);
cmd.Parameters.AddWithValue("@slot", slot);
cmd.Parameters.AddWithValue("@guildleveId", glId);
cmd.Parameters.AddWithValue("@abandoned", 0);
@ -625,7 +625,7 @@ namespace Meteor.Map
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@charaId", player.Id);
cmd.Parameters.AddWithValue("@guildleveId", glId);
cmd.ExecuteNonQuery();
@ -658,7 +658,7 @@ namespace Meteor.Map
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@charaId", player.Id);
cmd.Parameters.AddWithValue("@questId", 0xFFFFF & questId);
cmd.ExecuteNonQuery();
@ -694,7 +694,7 @@ namespace Meteor.Map
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@charaId", player.Id);
cmd.Parameters.AddWithValue("@questId", 0xFFFFF & questId);
cmd.ExecuteNonQuery();
@ -719,7 +719,7 @@ namespace Meteor.Map
{
conn.Open();
MySqlCommand cmd = new MySqlCommand("SELECT * FROM characters_quest_completed WHERE characterId = @charaId and questId = @questId", conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@charaId", player.Id);
cmd.Parameters.AddWithValue("@questId", questId);
isCompleted = cmd.ExecuteScalar() != null;
}
@ -778,7 +778,7 @@ namespace Meteor.Map
FROM characters WHERE id = @charId";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
if (reader.Read())
@ -788,8 +788,8 @@ namespace Meteor.Map
int privateAreaType;
player.displayNameId = -1;
player.customDisplayName = reader.GetString(0);
player.LocalizedDisplayName = -1;
player.DisplayName = reader.GetString(0);
player.oldPositionX = player.positionX = reader.GetFloat(1);
player.oldPositionY = player.positionY = reader.GetFloat(2);
player.oldPositionZ = player.positionZ = reader.GetFloat(3);
@ -852,7 +852,7 @@ namespace Meteor.Map
FROM characters_class_levels WHERE characterId = @charId";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
if (reader.Read())
@ -908,7 +908,7 @@ namespace Meteor.Map
FROM characters_class_exp WHERE characterId = @charId";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
if (reader.Read())
@ -948,7 +948,7 @@ namespace Meteor.Map
FROM characters_parametersave WHERE characterId = @charId";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
if (reader.Read())
@ -1001,7 +1001,7 @@ namespace Meteor.Map
FROM characters_appearance WHERE characterId = @charId";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
if (reader.Read())
@ -1055,7 +1055,7 @@ namespace Meteor.Map
FROM characters_statuseffect WHERE characterId = @charId";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
@ -1092,7 +1092,7 @@ namespace Meteor.Map
FROM characters_chocobo WHERE characterId = @charId";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
if (reader.Read())
@ -1130,7 +1130,7 @@ namespace Meteor.Map
FROM characters_timers WHERE characterId = @charId";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
if (reader.Read())
@ -1156,7 +1156,7 @@ namespace Meteor.Map
FROM characters_quest_scenario WHERE characterId = @charId";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
@ -1186,7 +1186,7 @@ namespace Meteor.Map
FROM characters_quest_guildleve_local WHERE characterId = @charId";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
@ -1206,7 +1206,7 @@ namespace Meteor.Map
FROM characters_quest_guildleve_regional WHERE characterId = @charId";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
@ -1227,7 +1227,7 @@ namespace Meteor.Map
FROM characters_npclinkshell WHERE characterId = @charId";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
@ -1277,7 +1277,7 @@ namespace Meteor.Map
WHERE characterId = @charId AND (classId = @classId OR classId = 0) ORDER BY equipSlot";
MySqlCommand cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
cmd.Parameters.AddWithValue("@classId", classId);
using (MySqlDataReader reader = cmd.ExecuteReader())
@ -1322,7 +1322,7 @@ namespace Meteor.Map
";
MySqlCommand cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@characterId", player.actorId);
cmd.Parameters.AddWithValue("@characterId", player.Id);
cmd.Parameters.AddWithValue("@classId", (equipSlot == Player.SLOT_UNDERSHIRT || equipSlot == Player.SLOT_UNDERGARMENT) ? 0 : player.charaWork.parameterSave.state_mainSkill[0]);
cmd.Parameters.AddWithValue("@equipSlot", equipSlot);
cmd.Parameters.AddWithValue("@uniqueItemId", uniqueItemId);
@ -1356,7 +1356,7 @@ namespace Meteor.Map
";
MySqlCommand cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@characterId", player.actorId);
cmd.Parameters.AddWithValue("@characterId", player.Id);
cmd.Parameters.AddWithValue("@classId", player.charaWork.parameterSave.state_mainSkill[0]);
cmd.Parameters.AddWithValue("@equipSlot", equipSlot);
@ -1399,7 +1399,7 @@ namespace Meteor.Map
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
cmd.Parameters.AddWithValue("@classId", classId);
cmd.Parameters.AddWithValue("@commandId", commandId);
cmd.Parameters.AddWithValue("@hotbarSlot", hotbarSlot);
@ -1442,7 +1442,7 @@ namespace Meteor.Map
WHERE characterId = @charId AND classId = @classId AND hotbarSlot = @hotbarSlot
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
cmd.Parameters.AddWithValue("@classId", player.charaWork.parameterSave.state_mainSkill[0]);
cmd.Parameters.AddWithValue("@hotbarSlot", hotbarSlot);
cmd.ExecuteNonQuery();
@ -1479,7 +1479,7 @@ namespace Meteor.Map
ORDER BY hotbarSlot";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
cmd.Parameters.AddWithValue("@classId", player.GetCurrentClassOrJob());
player.charaWork.commandBorder = 32;
@ -1537,7 +1537,7 @@ namespace Meteor.Map
ORDER BY hotbarSlot
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
cmd.Parameters.AddWithValue("@classId", classId);
using (MySqlDataReader reader = cmd.ExecuteReader())
@ -1612,7 +1612,7 @@ namespace Meteor.Map
ORDER BY slot ASC";
MySqlCommand cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", owner.actorId);
cmd.Parameters.AddWithValue("@charId", owner.Id);
cmd.Parameters.AddWithValue("@type", type);
ushort slot = 0;
@ -1716,7 +1716,7 @@ namespace Meteor.Map
MySqlCommand cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@serverItemId", addedItem.uniqueId);
cmd.Parameters.AddWithValue("@charId", owner.actorId);
cmd.Parameters.AddWithValue("@charId", owner.Id);
cmd.Parameters.AddWithValue("@itemPackage", itemPackage);
cmd.Parameters.AddWithValue("@slot", slot);
@ -1747,7 +1747,7 @@ namespace Meteor.Map
";
MySqlCommand cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", owner.actorId);
cmd.Parameters.AddWithValue("@charId", owner.Id);
cmd.Parameters.AddWithValue("@serverItemId", serverItemId);
cmd.ExecuteNonQuery();
@ -1912,7 +1912,7 @@ namespace Meteor.Map
WHERE characterId = @charId AND rewardPoints <> 0 AND timeDone IS NOT NULL ORDER BY timeDone LIMIT 5";
MySqlCommand cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
int count = 0;
@ -1933,7 +1933,7 @@ namespace Meteor.Map
}
}
return SetLatestAchievementsPacket.BuildPacket(player.actorId, latestAchievements);
return SetLatestAchievementsPacket.BuildPacket(player.Id, latestAchievements);
}
public static SubPacket GetAchievementsPacket(Player player)
@ -1953,7 +1953,7 @@ namespace Meteor.Map
WHERE characterId = @charId AND timeDone IS NOT NULL";
MySqlCommand cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
@ -1979,7 +1979,7 @@ namespace Meteor.Map
}
}
return cheevosPacket.BuildPacket(player.actorId);
return cheevosPacket.BuildPacket(player.Id);
}
public static SubPacket GetAchievementProgress(Player player, uint achievementId)
@ -1997,7 +1997,7 @@ namespace Meteor.Map
WHERE characterId = @charId AND achievementId = @achievementId";
MySqlCommand cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charId", player.actorId);
cmd.Parameters.AddWithValue("@charId", player.Id);
cmd.Parameters.AddWithValue("@achievementId", achievementId);
using (MySqlDataReader reader = cmd.ExecuteReader())
{
@ -2017,7 +2017,7 @@ namespace Meteor.Map
conn.Dispose();
}
}
return SendAchievementRatePacket.BuildPacket(player.actorId, achievementId, progress, progressFlags);
return SendAchievementRatePacket.BuildPacket(player.Id, achievementId, progress, progressFlags);
}
public static bool CreateLinkshell(Player player, string lsName, ushort lsCrest)
@ -2039,7 +2039,7 @@ namespace Meteor.Map
MySqlCommand cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@lsName", lsName);
cmd.Parameters.AddWithValue("@master", player.actorId);
cmd.Parameters.AddWithValue("@master", player.Id);
cmd.Parameters.AddWithValue("@crest", lsCrest);
cmd.ExecuteNonQuery();
@ -2079,7 +2079,7 @@ namespace Meteor.Map
";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@charaId", player.Id);
cmd.Parameters.AddWithValue("@lsId", npcLSId);
cmd.Parameters.AddWithValue("@calling", isCalling ? 1 : 0);
cmd.Parameters.AddWithValue("@extra", isExtra ? 1 : 0);
@ -2352,7 +2352,7 @@ namespace Meteor.Map
hasChocobo=@hasChocobo, chocoboAppearance=@chocoboAppearance, chocoboName=@chocoboName";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@characterId", player.actorId);
cmd.Parameters.AddWithValue("@characterId", player.Id);
cmd.Parameters.AddWithValue("@hasChocobo", 1);
cmd.Parameters.AddWithValue("@chocoboAppearance", appearanceId);
cmd.Parameters.AddWithValue("@chocoboName", name);
@ -2389,7 +2389,7 @@ namespace Meteor.Map
characterId = @characterId";
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@characterId", player.actorId);
cmd.Parameters.AddWithValue("@characterId", player.Id);
cmd.Parameters.AddWithValue("@chocoboAppearance", appearanceId);
cmd.ExecuteNonQuery();
@ -2477,7 +2477,7 @@ namespace Meteor.Map
{
var duration = Utils.UnixTimeStampUTC(effect.GetEndTime()) - Utils.UnixTimeStampUTC();
cmd.Parameters.AddWithValue("@actorId", player.actorId);
cmd.Parameters.AddWithValue("@actorId", player.Id);
cmd.Parameters.AddWithValue("@statusId", effect.GetStatusEffectId());
cmd.Parameters.AddWithValue("@magnitude", effect.GetMagnitude());
cmd.Parameters.AddWithValue("@duration", duration);
@ -2689,7 +2689,7 @@ namespace Meteor.Map
cmd.Prepare();
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@characterId", player.actorId);
cmd.Parameters.AddWithValue("@characterId", player.Id);
cmd.Parameters.AddWithValue("@exp", exp);
cmd.ExecuteNonQuery();
}
@ -2722,7 +2722,7 @@ namespace Meteor.Map
cmd.Prepare();
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@characterId", player.actorId);
cmd.Parameters.AddWithValue("@characterId", player.Id);
cmd.Parameters.AddWithValue("@lvl", level);
cmd.ExecuteNonQuery();
}
@ -2756,7 +2756,7 @@ namespace Meteor.Map
";
MySqlCommand cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@charaId", player.actorId);
cmd.Parameters.AddWithValue("@charaId", player.Id);
cmd.Parameters.AddWithValue("@retainerIndex", retainerIndex - 1);
using (MySqlDataReader reader = cmd.ExecuteReader())
@ -2770,7 +2770,7 @@ namespace Meteor.Map
ActorClass actorClass = Server.GetWorldManager().GetActorClass(actorClassId);
retainer = new Retainer(retainerId, actorClass, player, 0, 0, 0, 0);
retainer.customDisplayName = name;
retainer.DisplayName = name;
retainer.LoadEventConditions(actorClass.eventConditions);
}
}
@ -2854,7 +2854,7 @@ namespace Meteor.Map
cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@level", level);
cmd.Parameters.AddWithValue("@characterId", player.actorId);
cmd.Parameters.AddWithValue("@characterId", player.Id);
cmd.ExecuteNonQuery();
}

View file

@ -107,8 +107,8 @@ namespace Meteor.Map.lua
public void AddWaitEventCoroutine(Player player, Coroutine coroutine)
{
if (!mSleepingOnPlayerEvent.ContainsKey(player.actorId))
mSleepingOnPlayerEvent.Add(player.actorId, coroutine);
if (!mSleepingOnPlayerEvent.ContainsKey(player.Id))
mSleepingOnPlayerEvent.Add(player.Id, coroutine);
}
public void PulseSleepingOnTime(object state)
@ -149,12 +149,12 @@ namespace Meteor.Map.lua
public void OnEventUpdate(Player player, List<LuaParam> args)
{
if (mSleepingOnPlayerEvent.ContainsKey(player.actorId))
if (mSleepingOnPlayerEvent.ContainsKey(player.Id))
{
try
{
Coroutine coroutine = mSleepingOnPlayerEvent[player.actorId];
mSleepingOnPlayerEvent.Remove(player.actorId);
Coroutine coroutine = mSleepingOnPlayerEvent[player.Id];
mSleepingOnPlayerEvent.Remove(player.Id);
DynValue value = coroutine.Resume(LuaUtils.CreateLuaParamObjectList(args));
ResolveResume(player, coroutine, value);
}
@ -400,8 +400,8 @@ namespace Meteor.Map.lua
}
else if (target is Quest)
{
string initial = ((Quest)target).actorName.Substring(0, 3);
string questName = ((Quest)target).actorName;
string initial = ((Quest)target).Name.Substring(0, 3);
string questName = ((Quest)target).Name;
return root + String.Format(FILEPATH_QUEST, initial, questName);
}
else
@ -640,10 +640,10 @@ namespace Meteor.Map.lua
lparams.AddRange(eventStart.luaParams);
lparams.Insert(0, new LuaParam(0, eventStart.eventType));
lparams.Insert(1, new LuaParam(2, eventStart.eventName));
if (mSleepingOnPlayerEvent.ContainsKey(player.actorId))
if (mSleepingOnPlayerEvent.ContainsKey(player.Id))
{
Coroutine coroutine = mSleepingOnPlayerEvent[player.actorId];
mSleepingOnPlayerEvent.Remove(player.actorId);
Coroutine coroutine = mSleepingOnPlayerEvent[player.Id];
mSleepingOnPlayerEvent.Remove(player.Id);
try
{
@ -777,7 +777,7 @@ namespace Meteor.Map.lua
{
if (permissions > 0 && !player.isGM)
{
Program.Log.Info("LuaEngine.RunGMCommand: {0}'s GM level is too low to use command {1}.", player.actorName, cmd);
Program.Log.Info("LuaEngine.RunGMCommand: {0}'s GM level is too low to use command {1}.", player.Name, cmd);
return;
}
// i hate to do this, but cant think of a better way to keep !help
@ -902,7 +902,7 @@ namespace Meteor.Map.lua
return;
List<SubPacket> SendError = new List<SubPacket>();
player.SendMessage(SendMessagePacket.MESSAGE_TYPE_SYSTEM_ERROR, "", message);
player.QueuePacket(EndEventPacket.BuildPacket(player.actorId, player.currentEventOwner, player.currentEventName, 0));
player.QueuePacket(EndEventPacket.BuildPacket(player.Id, player.currentEventOwner, player.currentEventName, 0));
}
}

View file

@ -439,7 +439,7 @@ namespace Meteor.Map
}
else if (o is Actor)
{
luaParams.Add(new LuaParam(0x6, ((Actor)o).actorId));
luaParams.Add(new LuaParam(0x6, ((Actor)o).Id));
}
else if (o is ItemRefParam)
{

View file

@ -82,7 +82,7 @@ namespace Meteor.Map
if (!beginSessionPacket.isLogin)
Server.GetWorldManager().DoZoneIn(session.GetActor(), false, session.GetActor().destinationSpawnType);
Program.Log.Info("{0} has been added to the session list.", session.GetActor().customDisplayName);
Program.Log.Info("{0} has been added to the session list.", session.GetActor().DisplayName);
client.FlushQueuedSendPackets();
break;
@ -96,7 +96,7 @@ namespace Meteor.Map
session.GetActor().CleanupAndSave(endSessionPacket.destinationZoneId, endSessionPacket.destinationSpawnType, endSessionPacket.destinationX, endSessionPacket.destinationY, endSessionPacket.destinationZ, endSessionPacket.destinationRot);
Server.GetServer().RemoveSession(session.id);
Program.Log.Info("{0} has been removed from the session list.", session.GetActor().customDisplayName);
Program.Log.Info("{0} has been removed from the session list.", session.GetActor().DisplayName);
session.QueuePacket(SessionEndConfirmPacket.BuildPacket(session, endSessionPacket.destinationZoneId));
client.FlushQueuedSendPackets();
@ -138,7 +138,7 @@ namespace Meteor.Map
}
if (chatMessage.logType == SendMessagePacket.MESSAGE_TYPE_SAY || chatMessage.logType == SendMessagePacket.MESSAGE_TYPE_SHOUT)
session.GetActor().BroadcastPacket(SendMessagePacket.BuildPacket(session.id, chatMessage.logType, session.GetActor().customDisplayName, chatMessage.message), false);
session.GetActor().BroadcastPacket(SendMessagePacket.BuildPacket(session.id, chatMessage.logType, session.GetActor().DisplayName, chatMessage.message), false);
break;
//Langauge Code (Client safe to send packets to now)
@ -202,7 +202,7 @@ namespace Meteor.Map
if (ownerActor == null)
{
//Is it your retainer?
if (session.GetActor().currentSpawnedRetainer != null && session.GetActor().currentSpawnedRetainer.actorId == eventStart.ownerActorID)
if (session.GetActor().currentSpawnedRetainer != null && session.GetActor().currentSpawnedRetainer.Id == eventStart.ownerActorID)
ownerActor = session.GetActor().currentSpawnedRetainer;
//Is it a instance actor?
if (ownerActor == null)
@ -272,7 +272,7 @@ namespace Meteor.Map
((Character)Server.GetWorldManager().GetActorInWorld(packageRequest.actorID)).SendItemPackage(session.GetActor(), packageRequest.packageId);
break;
}
if (session.GetActor().GetSpawnedRetainer() != null && session.GetActor().GetSpawnedRetainer().actorId == packageRequest.actorID)
if (session.GetActor().GetSpawnedRetainer() != null && session.GetActor().GetSpawnedRetainer().Id == packageRequest.actorID)
session.GetActor().GetSpawnedRetainer().SendItemPackage(session.GetActor(), packageRequest.packageId);
break;
//Group Created Confirm

View file

@ -153,7 +153,7 @@ namespace Meteor.Map
{
foreach (Session s in mSessionList.Values)
{
if (s.GetActor().customDisplayName.ToLower().Equals(name.ToLower()))
if (s.GetActor().DisplayName.ToLower().Equals(name.ToLower()))
return s;
}
return null;

View file

@ -47,7 +47,7 @@ namespace Meteor.Map.utils
{
currentActorPropertyPacket.SetIsMore(true);
currentActorPropertyPacket.AddTarget();
subPackets.Add(currentActorPropertyPacket.BuildPacket(forActor.actorId));
subPackets.Add(currentActorPropertyPacket.BuildPacket(forActor.Id));
currentActorPropertyPacket = new SetActorPropetyPacket(currentTarget);
currentActorPropertyPacket.AddProperty(forActor, property);
}
@ -64,7 +64,7 @@ namespace Meteor.Map.utils
{
currentActorPropertyPacket.AddTarget();
currentActorPropertyPacket.SetIsMore(false);
subPackets.Add(currentActorPropertyPacket.BuildPacket(forActor.actorId));
subPackets.Add(currentActorPropertyPacket.BuildPacket(forActor.Id));
return subPackets;
}

View file

@ -838,7 +838,7 @@ namespace Meteor.Map
//This server does not contain that zoneId
if (newArea == null)
{
Program.Log.Debug("Request to change to zone not on this server by: {0}.", player.customDisplayName);
Program.Log.Debug("Request to change to zone not on this server by: {0}.", player.DisplayName);
RequestWorldServerZoneChange(player, destinationZoneId, spawnType, spawnX, spawnY, spawnZ, spawnRotation);
return;
}
@ -868,7 +868,7 @@ namespace Meteor.Map
//Delete content if have
if (player.currentContentGroup != null)
{
player.currentContentGroup.RemoveMember(player.actorId);
player.currentContentGroup.RemoveMember(player.Id);
player.SetCurrentContentGroup(null);
if (oldArea is PrivateAreaContent)
@ -876,8 +876,8 @@ namespace Meteor.Map
}
//Send packets
player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.actorId));
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x2));
player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.Id));
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.Id, 0x2));
player.SendZoneInPackets(this, spawnType);
player.playerSession.ClearInstance();
player.SendInstanceUpdate();
@ -908,7 +908,7 @@ namespace Meteor.Map
player.rotation = spawnRotation;
//Send packets
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x10));
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.Id, 0x10));
player.playerSession.QueuePacket(player.CreateSpawnTeleportPacket(spawnType));
player.playerSession.LockUpdates(false);
@ -922,7 +922,7 @@ namespace Meteor.Map
//Content area was null
if (contentArea == null)
{
Program.Log.Debug("Request to change to content area not on this server by: {0}.", player.customDisplayName);
Program.Log.Debug("Request to change to content area not on this server by: {0}.", player.DisplayName);
return;
}
@ -948,8 +948,8 @@ namespace Meteor.Map
player.SendGameMessage(GetActor(), 34108, 0x20);
//Send packets
player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.actorId));
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x10));
player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.Id));
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.Id, 0x10));
player.SendZoneInPackets(this, spawnType);
player.playerSession.ClearInstance();
player.SendInstanceUpdate(true);
@ -977,8 +977,8 @@ namespace Meteor.Map
//Send packets
if (!isLogin)
{
player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.actorId));
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x2));
player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.Id));
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.Id, 0x2));
}
player.SendZoneInPackets(this, spawnType);
@ -1021,7 +1021,7 @@ namespace Meteor.Map
{
initialMembers = new uint[actors.Length];
for (int i = 0; i < actors.Length; i++)
initialMembers[i] = actors[i].actorId;
initialMembers[i] = actors[i].Id;
}
groupIndexId = groupIndexId | 0x3000000000000000;
@ -1049,7 +1049,7 @@ namespace Meteor.Map
{
initialMembers = new uint[actors.Count];
for (int i = 0; i < actors.Count; i++)
initialMembers[i] = actors[i].actorId;
initialMembers[i] = actors[i].Id;
}
groupIndexId = groupIndexId | 0x3000000000000000;
@ -1077,7 +1077,7 @@ namespace Meteor.Map
{
initialMembers = new uint[actors.Count];
for (int i = 0; i < actors.Count; i++)
initialMembers[i] = actors[i].actorId;
initialMembers[i] = actors[i].Id;
}
groupIndexId = groupIndexId | 0x2000000000000000;
@ -1110,11 +1110,11 @@ namespace Meteor.Map
{
groupIndexId = groupIndexId | 0x0000000000000000;
RelationGroup group = new RelationGroup(groupIndexId, inviter.actorId, invitee.actorId, 0, groupType);
RelationGroup group = new RelationGroup(groupIndexId, inviter.Id, invitee.Id, 0, groupType);
mRelationGroups.Add(groupIndexId, group);
groupIndexId++;
group.SendGroupPacketsAll(inviter.actorId, invitee.actorId);
group.SendGroupPacketsAll(inviter.Id, invitee.Id);
return group;
}
@ -1150,12 +1150,12 @@ namespace Meteor.Map
inviter.SendGameMessage(GetActor(), 25043, 0x20, (object)invitee); //You cannot trade with yourself.
return null;
}
else if (GetTradeGroup(inviter.actorId) != null)
else if (GetTradeGroup(inviter.Id) != null)
{
inviter.SendGameMessage(GetActor(), 25045, 0x20, (object)invitee); //You may only trade with one person at a time.
return null;
}
else if (GetTradeGroup(invitee.actorId) != null)
else if (GetTradeGroup(invitee.Id) != null)
{
inviter.SendGameMessage(GetActor(), 25044, 0x20, (object)invitee); //Your target is unable to trade.
return null;
@ -1166,11 +1166,11 @@ namespace Meteor.Map
{
groupIndexId = groupIndexId | 0x0000000000000000;
TradeGroup group = new TradeGroup(groupIndexId, inviter.actorId, invitee.actorId);
TradeGroup group = new TradeGroup(groupIndexId, inviter.Id, invitee.Id);
mTradeGroups.Add(groupIndexId, group);
groupIndexId++;
group.SendGroupPacketsAll(inviter.actorId, invitee.actorId);
group.SendGroupPacketsAll(inviter.Id, invitee.Id);
inviter.SendGameMessage(GetActor(), 25101, 0x20, (object)invitee); //You request to trade with X
invitee.SendGameMessage(GetActor(), 25037, 0x20, (object)inviter); //X wishes to trade with you
@ -1212,7 +1212,7 @@ namespace Meteor.Map
public void AcceptTrade(Player invitee)
{
TradeGroup group = GetTradeGroup(invitee.actorId);
TradeGroup group = GetTradeGroup(invitee.Id);
if (group == null)
{
@ -1233,7 +1233,7 @@ namespace Meteor.Map
public void CancelTradeTooFar(Player inviter)
{
TradeGroup group = GetTradeGroup(inviter.actorId);
TradeGroup group = GetTradeGroup(inviter.Id);
if (group == null)
{
@ -1252,7 +1252,7 @@ namespace Meteor.Map
public void CancelTrade(Player inviter)
{
TradeGroup group = GetTradeGroup(inviter.actorId);
TradeGroup group = GetTradeGroup(inviter.Id);
if (group == null)
{
@ -1271,7 +1271,7 @@ namespace Meteor.Map
public void RefuseTrade(Player invitee)
{
TradeGroup group = GetTradeGroup(invitee.actorId);
TradeGroup group = GetTradeGroup(invitee.Id);
if (group == null)
{
@ -1292,7 +1292,7 @@ namespace Meteor.Map
if (!p1.IsTradeAccepted() || !p2.IsTradeAccepted())
return;
TradeGroup group = GetTradeGroup(p1.actorId);
TradeGroup group = GetTradeGroup(p1.Id);
if (group == null)
{
@ -1467,9 +1467,9 @@ namespace Meteor.Map
}
//TODO: Refactor so that it's not a mess like V
player.QueuePacket(InventoryBeginChangePacket.BuildPacket(player.actorId));
player.QueuePacket(InventoryBeginChangePacket.BuildPacket(player.Id));
originalPackage.SendUpdate();
player.QueuePacket(InventoryEndChangePacket.BuildPacket(player.actorId));
player.QueuePacket(InventoryEndChangePacket.BuildPacket(player.Id));
}
}
else if (bazaarMode == InventoryItem.MODE_SELL_FSTACK)
@ -1506,9 +1506,9 @@ namespace Meteor.Map
reward.ChangeQuantity(-rewardAmount);
finalReward = splitItem;
player.QueuePacket(InventoryBeginChangePacket.BuildPacket(player.actorId));
player.QueuePacket(InventoryBeginChangePacket.BuildPacket(player.Id));
originalRewardPackage.SendUpdate();
player.QueuePacket(InventoryEndChangePacket.BuildPacket(player.actorId));
player.QueuePacket(InventoryEndChangePacket.BuildPacket(player.Id));
}
else
return ItemPackage.ERROR_SYSTEM;
@ -1531,9 +1531,9 @@ namespace Meteor.Map
seek.ChangeQuantity(-seekAmount);
finalSeek = splitItem;
player.QueuePacket(InventoryBeginChangePacket.BuildPacket(player.actorId));
player.QueuePacket(InventoryBeginChangePacket.BuildPacket(player.Id));
originalSeekPackage.SendUpdate();
player.QueuePacket(InventoryEndChangePacket.BuildPacket(player.actorId));
player.QueuePacket(InventoryEndChangePacket.BuildPacket(player.Id));
}
else
return ItemPackage.ERROR_SYSTEM;
@ -1545,9 +1545,9 @@ namespace Meteor.Map
bazaarPackage.AddItem(finalSeek);
finalReward.SetAsOfferTo(bazaarMode, finalSeek);
player.QueuePacket(InventoryBeginChangePacket.BuildPacket(player.actorId));
player.QueuePacket(InventoryBeginChangePacket.BuildPacket(player.Id));
bazaarPackage.SendUpdate();
player.QueuePacket(InventoryEndChangePacket.BuildPacket(player.actorId));
player.QueuePacket(InventoryEndChangePacket.BuildPacket(player.Id));
}
player.CheckBazaarFlags();
@ -1603,7 +1603,7 @@ namespace Meteor.Map
public void RequestWorldLinkshellCreate(Player player, string name, ushort crest)
{
SubPacket packet = CreateLinkshellPacket.BuildPacket(player.playerSession, name, crest, player.actorId);
SubPacket packet = CreateLinkshellPacket.BuildPacket(player.playerSession, name, crest, player.Id);
player.QueuePacket(packet);
}