mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-12 07:24:37 +02:00
Fixed up warping with new values for SetActorPosition packet. The script instantiation packet is done and implemented. Player init is done except for parameters.
This commit is contained in:
parent
071b1f11a8
commit
c9f35a207b
6 changed files with 82 additions and 55 deletions
|
@ -61,10 +61,17 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
|
||||
public SubPacket createSpawnPositonPacket(uint playerActorId, uint spawnType)
|
||||
{
|
||||
return SetActorPositionPacket.buildPacket(actorId, playerActorId, SetActorPositionPacket.INNPOS_X, SetActorPositionPacket.INNPOS_Y, SetActorPositionPacket.INNPOS_Z, SetActorPositionPacket.INNPOS_ROT, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE);
|
||||
SubPacket spawnPacket;
|
||||
if (!spawnedFirstTime && playerActorId == actorId)
|
||||
spawnPacket = SetActorPositionPacket.buildPacket(actorId, playerActorId, 0, positionX, positionY, positionZ, rotation, spawnType, false);
|
||||
else if (playerActorId == actorId)
|
||||
spawnPacket = SetActorPositionPacket.buildPacket(actorId, playerActorId, 0xFFFFFFFF, positionX, positionY, positionZ, rotation, spawnType, true);
|
||||
else
|
||||
spawnPacket = SetActorPositionPacket.buildPacket(actorId, playerActorId, actorId, positionX, positionY, positionZ, rotation, spawnType, false);
|
||||
|
||||
//return SetActorPositionPacket.buildPacket(actorId, playerActorId, -211.895477f, 190.000000f, 29.651011f, 2.674819f, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE);
|
||||
//spawnedFirstTime = true;
|
||||
//return spawnPacket;
|
||||
spawnedFirstTime = true;
|
||||
return spawnPacket;
|
||||
}
|
||||
|
||||
public SubPacket createPositionUpdatePacket(uint playerActorId)
|
||||
|
@ -92,7 +99,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
List<SubPacket> subpackets = new List<SubPacket>();
|
||||
subpackets.Add(createAddActorPacket(playerActorId));
|
||||
subpackets.Add(createSpeedPacket(playerActorId));
|
||||
subpackets.Add(createSpawnPositonPacket(playerActorId, 0xFF));
|
||||
subpackets.Add(createSpawnPositonPacket(playerActorId, 0x1));
|
||||
subpackets.Add(createNamePacket(playerActorId));
|
||||
subpackets.Add(createStatePacket(playerActorId));
|
||||
subpackets.Add(createIsZoneingPacket(playerActorId));
|
||||
|
|
|
@ -43,8 +43,8 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
|
||||
public Player(uint actorID) : base(actorID)
|
||||
{
|
||||
actorName = String.Format("_player{0:00000000}", actorID);
|
||||
|
||||
actorName = String.Format("_pc{0:00000000}", actorID);
|
||||
className = "Player";
|
||||
currentSubState = SetActorStatePacket.SUB_STATE_PLAYER;
|
||||
|
||||
DBStats stats = Database.getCharacterStats(actorID);
|
||||
|
@ -118,8 +118,7 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
List<LuaParam> lParams;
|
||||
if (isMyPlayer(playerActorId))
|
||||
{
|
||||
|
||||
lParams = LuaUtils.createLuaParamList("/Chara/Player/Player_work", false, false, false, false, false, true);
|
||||
lParams = LuaUtils.createLuaParamList("/Chara/Player/Player_work", false, false, false, true, 0, false, timers, true);
|
||||
}
|
||||
else
|
||||
lParams = LuaUtils.createLuaParamList("/Chara/Player/Player_work", false, false, false, false, false, true);
|
||||
|
@ -134,7 +133,7 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
if (isMyPlayer(playerActorId))
|
||||
subpackets.AddRange(create0x132Packets(playerActorId));
|
||||
subpackets.Add(createSpeedPacket(playerActorId));
|
||||
subpackets.Add(createSpawnPositonPacket(playerActorId, 0xFF));
|
||||
subpackets.Add(createSpawnPositonPacket(playerActorId, 0x1));
|
||||
subpackets.Add(createAppearancePacket(playerActorId));
|
||||
subpackets.Add(createNamePacket(playerActorId));
|
||||
subpackets.Add(_0xFPacket.buildPacket(playerActorId, playerActorId));
|
||||
|
@ -143,7 +142,8 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
subpackets.Add(createInitStatusPacket(playerActorId));
|
||||
subpackets.Add(createSetActorIconPacket(playerActorId));
|
||||
subpackets.Add(createIsZoneingPacket(playerActorId));
|
||||
//subpackets.Add(createScriptBindPacket(playerActorId));
|
||||
subpackets.Add(createScriptBindPacket(playerActorId));
|
||||
|
||||
return BasePacket.createPacket(subpackets, true, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue