Got warp working. BROKE ACTOR SPAWNING!

This commit is contained in:
Filip Maj 2016-01-08 21:37:09 -05:00
parent 360d72b376
commit fac9d28529
11 changed files with 137 additions and 14 deletions

View file

@ -26,8 +26,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
public uint currentMainState = SetActorStatePacket.MAIN_STATE_PASSIVE;
public uint currentSubState = SetActorStatePacket.SUB_STATE_NONE;
public float positionX, positionY, positionZ, rotation;
public float positionX = SetActorPositionPacket.INNPOS_X, positionY = SetActorPositionPacket.INNPOS_Y, positionZ = SetActorPositionPacket.INNPOS_Z, rotation = SetActorPositionPacket.INNPOS_ROT;
public float oldPositionX, oldPositionY, oldPositionZ, oldRotation;
public ushort moveState, oldMoveState;
@ -35,6 +34,8 @@ namespace FFXIVClassic_Map_Server.dataobjects
public bool isZoning = false;
public bool spawnedFirstTime = false;
public string className;
public List<LuaParam> classParams;
@ -62,6 +63,8 @@ namespace FFXIVClassic_Map_Server.dataobjects
{
return SetActorPositionPacket.buildPacket(actorId, playerActorId, SetActorPositionPacket.INNPOS_X, SetActorPositionPacket.INNPOS_Y, SetActorPositionPacket.INNPOS_Z, SetActorPositionPacket.INNPOS_ROT, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE);
//return SetActorPositionPacket.buildPacket(actorId, playerActorId, -211.895477f, 190.000000f, 29.651011f, 2.674819f, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE);
//spawnedFirstTime = true;
//return spawnPacket;
}
public SubPacket createPositionUpdatePacket(uint playerActorId)
@ -122,3 +125,4 @@ namespace FFXIVClassic_Map_Server.dataobjects
}
}

View file

@ -1,7 +1,9 @@
using FFXIVClassic_Lobby_Server;
using FFXIVClassic_Lobby_Server.common;
using FFXIVClassic_Lobby_Server.dataobjects;
using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;
using System;
using System.Collections.Generic;
using System.Linq;
@ -58,5 +60,32 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara.npc
appearanceIDs[L_FINGER] = appearance.leftFinger;
}
public override SubPacket createScriptBindPacket(uint playerActorId)
{
List<LuaParam> lParams;
lParams = LuaUtils.createLuaParamList("/Chara/Player/Player_work", false, false, false, false, false, true);
return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams);
}
public override BasePacket getInitPackets(uint playerActorId)
{
List<SubPacket> subpackets = new List<SubPacket>();
subpackets.Add(createAddActorPacket(playerActorId));
subpackets.Add(createSpeedPacket(playerActorId));
subpackets.Add(createSpawnPositonPacket(playerActorId, 0xFF));
subpackets.Add(createAppearancePacket(playerActorId));
subpackets.Add(createNamePacket(playerActorId));
subpackets.Add(createStatePacket(playerActorId));
subpackets.Add(createIdleAnimationPacket(playerActorId));
subpackets.Add(createInitStatusPacket(playerActorId));
subpackets.Add(createSetActorIconPacket(playerActorId));
subpackets.Add(createIsZoneingPacket(playerActorId));
//subpackets.Add(createScriptBindPacket(playerActorId));
return BasePacket.createPacket(subpackets, true, false);
}
}
}

View file

@ -15,6 +15,30 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
{
class Player : Character
{
public const int TIMER_TOTORAK = 0;
public const int TIMER_DZEMAEL = 1;
public const int TIMER_BOWL_OF_EMBERS_HARD = 2;
public const int TIMER_BOWL_OF_EMBERS = 3;
public const int TIMER_THORNMARCH = 4;
public const int TIMER_AURUMVALE = 5;
public const int TIMER_CUTTERSCRY = 6;
public const int TIMER_BATTLE_ALEPORT = 7;
public const int TIMER_BATTLE_HYRSTMILL = 8;
public const int TIMER_BATTLE_GOLDENBAZAAR = 9;
public const int TIMER_HOWLING_EYE_HARD = 10;
public const int TIMER_HOWLING_EYE = 11;
public const int TIMER_CASTRUM_TOWER = 12;
public const int TIMER_BOWL_OF_EMBERS_EXTREME = 13;
public const int TIMER_RIVENROAD = 14;
public const int TIMER_RIVENROAD_HARD = 15;
public const int TIMER_BEHEST = 16;
public const int TIMER_COMPANYBEHEST = 17;
public const int TIMER_RETURN = 18;
public const int TIMER_SKIRMISH = 19;
public uint[] timers = new uint[20];
PlayerWork playerWork = new PlayerWork();
public Player(uint actorID) : base(actorID)