mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-25 03:48:23 +02:00
Refactored how zones work. Cleaned out a lot of duplciations and smoothed out how Zones/PrivateAreas work.
This commit is contained in:
parent
56ba641e2a
commit
563118372a
32 changed files with 247 additions and 417 deletions
|
@ -34,8 +34,9 @@ namespace Meteor.Map.Actors
|
|||
{
|
||||
class Area : Actor
|
||||
{
|
||||
public string zoneName;
|
||||
public ushort regionId;
|
||||
public string ZoneName { get; private set; }
|
||||
public uint ZoneId { get; private set; }
|
||||
public ushort RegionId { get; private set; }
|
||||
public bool isIsolated, canStealth, isInn, canRideChocobo, isInstanceRaid;
|
||||
public ushort weatherNormal, weatherCommon, weatherRare;
|
||||
public ushort bgmDay, bgmNight, bgmBattle;
|
||||
|
@ -62,9 +63,10 @@ namespace Meteor.Map.Actors
|
|||
public Area(uint zoneId, string zoneName, ushort regionId, string classPath, ushort bgmDay, ushort bgmNight, ushort bgmBattle, bool isIsolated, bool isInn, bool canRideChocobo, bool canStealth, bool isInstanceRaid)
|
||||
: base((4 << 28 | zoneId << 19 | ((uint)1)))
|
||||
{
|
||||
ZoneName = zoneName;
|
||||
ZoneId = zoneId;
|
||||
RegionId = regionId;
|
||||
|
||||
this.zoneName = zoneName;
|
||||
this.regionId = regionId;
|
||||
this.canStealth = canStealth;
|
||||
this.isIsolated = isIsolated;
|
||||
this.isInn = isInn;
|
||||
|
@ -81,7 +83,6 @@ namespace Meteor.Map.Actors
|
|||
|
||||
this.classPath = classPath;
|
||||
this.className = classPath.Substring(classPath.LastIndexOf("/") + 1);
|
||||
this.zoneId = zoneId;
|
||||
|
||||
numXBlocks = (maxX - minX) / boundingGridSize;
|
||||
numYBlocks = (maxY - minY) / boundingGridSize;
|
||||
|
@ -98,10 +99,20 @@ namespace Meteor.Map.Actors
|
|||
}
|
||||
}
|
||||
|
||||
public virtual string GetPrivateAreaName()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public virtual int GetPrivateAreaType()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override SubPacket CreateScriptBindPacket()
|
||||
{
|
||||
List<LuaParam> lParams;
|
||||
lParams = LuaUtils.CreateLuaParamList(classPath, false, true, zoneName, "/Area/Zone/ZoneDefault", -1, (byte)1, true, false, false, false, false, false, false, false);
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue