mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-08-03 16:21:52 +02:00
Started to implement private areas. Works mostly, but only one instance is created. All the push triggers work more or less except bounding box.
This commit is contained in:
parent
67fed3dba5
commit
0876b293e8
13 changed files with 200 additions and 81 deletions
|
@ -33,7 +33,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
public float[] moveSpeeds = new float[5];
|
||||
|
||||
public uint zoneId;
|
||||
public Zone zone = null;
|
||||
public Area zone = null;
|
||||
public bool isZoning = false;
|
||||
|
||||
public bool spawnedFirstTime = false;
|
||||
|
@ -132,6 +132,24 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
subpackets.Add(SetEmoteEventCondition.buildPacket(playerActorId, actorId, condition.unknown1, condition.unknown2, condition.emoteId, condition.conditionName));
|
||||
}
|
||||
|
||||
if (eventConditions.pushWithCircleEventConditions != null)
|
||||
{
|
||||
foreach (EventList.PushCircleEventCondition condition in eventConditions.pushWithCircleEventConditions)
|
||||
subpackets.Add(SetPushEventConditionWithCircle.buildPacket(playerActorId, actorId, condition));
|
||||
}
|
||||
|
||||
if (eventConditions.pushWithFanEventConditions != null)
|
||||
{
|
||||
foreach (EventList.PushFanEventCondition condition in eventConditions.pushWithFanEventConditions)
|
||||
subpackets.Add(SetPushEventConditionWithFan.buildPacket(playerActorId, actorId, condition));
|
||||
}
|
||||
|
||||
if (eventConditions.pushWithBoxEventConditions != null)
|
||||
{
|
||||
foreach (EventList.PushBoxEventCondition condition in eventConditions.pushWithBoxEventConditions)
|
||||
subpackets.Add(SetPushEventConditionWithTriggerBox.buildPacket(playerActorId, actorId, condition));
|
||||
}
|
||||
|
||||
return subpackets;
|
||||
}
|
||||
|
||||
|
@ -161,6 +179,24 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, 1, 1, condition.conditionName));
|
||||
}
|
||||
|
||||
if (eventConditions.pushWithCircleEventConditions != null)
|
||||
{
|
||||
foreach (EventList.PushCircleEventCondition condition in eventConditions.pushWithCircleEventConditions)
|
||||
subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, 1, 2, condition.conditionName));
|
||||
}
|
||||
|
||||
if (eventConditions.pushWithFanEventConditions != null)
|
||||
{
|
||||
foreach (EventList.PushFanEventCondition condition in eventConditions.pushWithFanEventConditions)
|
||||
subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, 1, 2, condition.conditionName));
|
||||
}
|
||||
|
||||
if (eventConditions.pushWithBoxEventConditions != null)
|
||||
{
|
||||
foreach (EventList.PushBoxEventCondition condition in eventConditions.pushWithBoxEventConditions)
|
||||
subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, 1, 2, condition.conditionName));
|
||||
}
|
||||
|
||||
return BasePacket.createPacket(subpackets, true, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,30 +39,26 @@ namespace FFXIVClassic_Map_Server.actors
|
|||
|
||||
public class PushCircleEventCondition
|
||||
{
|
||||
public byte unknown1;
|
||||
public byte unknown2;
|
||||
public byte unknown4;
|
||||
public byte emoteId;
|
||||
public float radius;
|
||||
public int unknown5;
|
||||
public float unknown6;
|
||||
public string conditionName;
|
||||
public string conditionName = "";
|
||||
public float radius = 30.0f;
|
||||
public bool outwards = false;
|
||||
public bool silent = true;
|
||||
}
|
||||
|
||||
public class PushFanEventCondition
|
||||
{
|
||||
byte unknown1;
|
||||
byte unknown2;
|
||||
byte emoteId;
|
||||
string conditionName;
|
||||
public string conditionName;
|
||||
public float radius = 30.0f;
|
||||
public bool outwards = false;
|
||||
public bool silent = true;
|
||||
}
|
||||
|
||||
public class PushBoxEventCondition
|
||||
{
|
||||
byte unknown1;
|
||||
byte unknown2;
|
||||
byte emoteId;
|
||||
string conditionName;
|
||||
public string conditionName = "";
|
||||
public float size = 30.0f;
|
||||
public bool outwards = false;
|
||||
public bool silent = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,11 +22,22 @@ namespace FFXIVClassic_Map_Server.actors.area
|
|||
this.privateAreaName = privateAreaName;
|
||||
}
|
||||
|
||||
public string getPrivateAreaName()
|
||||
{
|
||||
return privateAreaName;
|
||||
}
|
||||
|
||||
public Zone getParentZone()
|
||||
{
|
||||
return parentZone;
|
||||
}
|
||||
|
||||
public override SubPacket createScriptBindPacket(uint playerActorId)
|
||||
{
|
||||
List<LuaParam> lParams;
|
||||
lParams = LuaUtils.createLuaParamList("/Area/PrivateArea/" + className, false, true, zoneName, privateAreaName, 0xE1, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, false, false, false);
|
||||
lParams = LuaUtils.createLuaParamList("/Area/PrivateArea/" + className, false, true, zoneName, privateAreaName, 0x9E, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, false, false, false);
|
||||
return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,17 @@ namespace FFXIVClassic_Map_Server.actors.area
|
|||
|
||||
}
|
||||
|
||||
public void addPrivateArea(PrivateArea pa)
|
||||
{
|
||||
if (privateAreas.ContainsKey(pa.getPrivateAreaName()))
|
||||
privateAreas[pa.getPrivateAreaName()][0] = pa;
|
||||
else
|
||||
{
|
||||
privateAreas[pa.getPrivateAreaName()] = new Dictionary<uint, PrivateArea>();
|
||||
privateAreas[pa.getPrivateAreaName()][0] = pa;
|
||||
}
|
||||
}
|
||||
|
||||
public PrivateArea getPrivateArea(string type, uint number)
|
||||
{
|
||||
if (privateAreas.ContainsKey(type))
|
||||
|
|
|
@ -636,7 +636,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
Log.info(String.Format("{0} has been logged out and saved.", this.customDisplayName));
|
||||
}
|
||||
|
||||
public Zone getZone()
|
||||
public Area getZone()
|
||||
{
|
||||
return zone;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue