mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
Fixing more merge errors. I'm bad at this
This commit is contained in:
parent
86a2e4aff3
commit
4dee26e136
@ -149,11 +149,39 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
//spawnPacket.DebugPrintSubPacket();
|
//spawnPacket.DebugPrintSubPacket();
|
||||||
|
|
||||||
return spawnPacket;
|
return spawnPacket;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SubPacket CreatePositionUpdatePacket(uint playerActorId)
|
public SubPacket CreatePositionUpdatePacket(bool forceUpdate = false)
|
||||||
{
|
{
|
||||||
return MoveActorToPositionPacket.BuildPacket(actorId, playerActorId, positionX, positionY, positionZ, rotation, moveState);
|
int updateMs = 300;
|
||||||
|
var diffTime = (DateTime.Now - lastMoveUpdate);
|
||||||
|
|
||||||
|
if (this.target != null)
|
||||||
|
{
|
||||||
|
updateMs = 150;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (forceUpdate || (hasMoved && ((this is Player) || diffTime.Milliseconds >= updateMs)))
|
||||||
|
{
|
||||||
|
hasMoved = (this.positionUpdates != null && this.positionUpdates.Count > 0);
|
||||||
|
if (hasMoved)
|
||||||
|
{
|
||||||
|
var pos = positionUpdates[0];
|
||||||
|
|
||||||
|
if (this is Character)
|
||||||
|
((Character)this).OnPath(pos);
|
||||||
|
|
||||||
|
positionX = pos.X;
|
||||||
|
positionY = pos.Y;
|
||||||
|
positionZ = pos.Z;
|
||||||
|
//Program.Server.GetInstance().mLuaEngine.OnPath(actor, position, positionUpdates)
|
||||||
|
|
||||||
|
positionUpdates.RemoveAt(0);
|
||||||
|
}
|
||||||
|
lastMoveUpdate = DateTime.Now;
|
||||||
|
return MoveActorToPositionPacket.BuildPacket(actorId, positionX, positionY, positionZ, rotation, moveState);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SubPacket CreateStatePacket()
|
public SubPacket CreateStatePacket()
|
||||||
|
@ -376,38 +376,23 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: for zones override this to seach contentareas (assuming flag is passed)
|
// todo: for zones override this to seach contentareas (assuming flag is passed)
|
||||||
<<<<<<< HEAD
|
|
||||||
public virtual List<Actor> GetAllActors()
|
|
||||||
{
|
|
||||||
lock (mActorList)
|
|
||||||
{
|
|
||||||
List<Actor> actorList = new List<Actor>(mActorList.Count);
|
|
||||||
foreach (var actor in mActorList.Values)
|
|
||||||
{
|
|
||||||
actorList.Add(actor);
|
|
||||||
}
|
|
||||||
=======
|
|
||||||
public virtual List<T> GetAllActors<T>() where T : Actor
|
public virtual List<T> GetAllActors<T>() where T : Actor
|
||||||
{
|
{
|
||||||
lock (mActorList)
|
lock (mActorList)
|
||||||
{
|
{
|
||||||
List<T> actorList = new List<T>(mActorList.Count);
|
List<T> actorList = new List<T>(mActorList.Count);
|
||||||
actorList.AddRange(mActorList.Values.OfType<T>());
|
actorList.AddRange(mActorList.Values.OfType<T>());
|
||||||
>>>>>>> 84d5eee1fcc284d252b7953a70aebed60b195ee8
|
|
||||||
return actorList;
|
return actorList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
public virtual List<Actor> GetAllActors()
|
public virtual List<Actor> GetAllActors()
|
||||||
{
|
{
|
||||||
return GetAllActors<Actor>();
|
return GetAllActors<Actor>();
|
||||||
}
|
}
|
||||||
|
|
||||||
>>>>>>> 84d5eee1fcc284d252b7953a70aebed60b195ee8
|
|
||||||
public void BroadcastPacketsAroundActor(Actor actor, List<SubPacket> packets)
|
public void BroadcastPacketsAroundActor(Actor actor, List<SubPacket> packets)
|
||||||
{
|
{
|
||||||
foreach (SubPacket packet in packets)
|
foreach (SubPacket packet in packets)
|
||||||
|
Loading…
Reference in New Issue
Block a user