mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	Checks and fixes for lua.
This commit is contained in:
		| @@ -60,6 +60,18 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|             this.moveSpeeds[3] = SetActorSpeedPacket.DEFAULT_ACTIVE; | ||||
|         } | ||||
|  | ||||
|         public void SetPushCircleRange(string triggerName, float size) | ||||
|         { | ||||
|             if (eventConditions == null || eventConditions.pushWithCircleEventConditions == null) | ||||
|                 return; | ||||
|  | ||||
|             foreach (EventList.PushCircleEventCondition condition in eventConditions.pushWithCircleEventConditions) | ||||
|             { | ||||
|                 if (condition.conditionName.Equals(triggerName)) | ||||
|                     condition.radius = size; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         public SubPacket CreateAddActorPacket(uint playerActorId, byte val) | ||||
|         { | ||||
|             return AddActorPacket.BuildPacket(actorId, playerActorId, val); | ||||
|   | ||||
| @@ -63,12 +63,6 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|             for (int i = 0; i < 32; i++ )             | ||||
|                 charaWork.property[i] = (byte)(((int)actorClass.propertyFlags >> i) & 1);             | ||||
|  | ||||
|             if (className.Equals("JellyfishScenarioLimsaLv00")) | ||||
|             { | ||||
|                 charaWork.property[2] = 1; | ||||
|                 npcWork.hateType = 1; | ||||
|             } | ||||
|  | ||||
|             npcWork.pushCommand = actorClass.pushCommand; | ||||
|             npcWork.pushCommandSub = actorClass.pushCommandSub; | ||||
|             npcWork.pushCommandPriority = actorClass.pushCommandPriority; | ||||
| @@ -99,6 +93,11 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|  | ||||
|             if (lParams != null && lParams.Count >= 3 && lParams[2].typeID == 0 && (int)lParams[2].value == 0) | ||||
|                 isStatic = true; | ||||
|             else | ||||
|             { | ||||
|                 charaWork.property[2] = 1; | ||||
|                 npcWork.hateType = 1; | ||||
|             } | ||||
|  | ||||
|             if (lParams == null) | ||||
|             { | ||||
| @@ -140,6 +139,10 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|             { | ||||
|                 subpackets.Add(_0xD8Packet.BuildPacket(actorId, playerActorId, 0xB09, 0x1af)); | ||||
|             } | ||||
|             else if (uniqueIdentifier.Equals("closed_gridania_gate")) | ||||
|             { | ||||
|                 subpackets.Add(_0xD8Packet.BuildPacket(actorId, playerActorId, 0xB79, 0x141)); | ||||
|             } | ||||
|             else if (uniqueIdentifier.Equals("uldah_mapshipport_1")) | ||||
|             { | ||||
|                 subpackets.Add(_0xD8Packet.BuildPacket(actorId, playerActorId,  0xdc5, 0x1af)); | ||||
|   | ||||
| @@ -1271,7 +1271,7 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|          | ||||
|         public void SendInstanceUpdate() | ||||
|         { | ||||
|             Server.GetWorldManager().SeamlessCheck(this); | ||||
|             //Server.GetWorldManager().SeamlessCheck(this); | ||||
|  | ||||
|             //Update Instance | ||||
|             List<Actor> aroundMe = new List<Actor>(); | ||||
|   | ||||
| @@ -147,6 +147,11 @@ namespace FFXIVClassic_Map_Server.lua | ||||
|  | ||||
|         private List<LuaParam> CallLuaFunctionNpcForReturn(Player player, Npc target, string funcName, params object[] args) | ||||
|         { | ||||
|             object[] args2 = new object[args.Length + 2]; | ||||
|             Array.Copy(args, 0, args2, 2, args.Length); | ||||
|             args2[0] = player; | ||||
|             args2[1] = target; | ||||
|  | ||||
|             LuaScript parent = null, child = null; | ||||
|  | ||||
|             if (File.Exists("./scripts/base/" + target.classPath + ".lua")) | ||||
| @@ -173,9 +178,9 @@ namespace FFXIVClassic_Map_Server.lua | ||||
|             DynValue result; | ||||
|  | ||||
|             if (child != null && child.Globals[funcName] != null) | ||||
|                 result = child.Call(child.Globals[funcName], this); | ||||
|                 result = child.Call(child.Globals[funcName], args2); | ||||
|             else if (parent != null && parent.Globals[funcName] != null) | ||||
|                 result = parent.Call(parent.Globals[funcName], this); | ||||
|                 result = parent.Call(parent.Globals[funcName], args2); | ||||
|             else | ||||
|                 return null; | ||||
|  | ||||
| @@ -218,7 +223,7 @@ namespace FFXIVClassic_Map_Server.lua | ||||
|  | ||||
|             if (child != null && !child.Globals.Get(funcName).IsNil()) | ||||
|                 coroutine = child.CreateCoroutine(child.Globals[funcName]).Coroutine; | ||||
|             else if (parent.Globals.Get(funcName) != null && !parent.Globals.Get(funcName).IsNil()) | ||||
|             else if (parent != null && parent.Globals.Get(funcName) != null && !parent.Globals.Get(funcName).IsNil()) | ||||
|                 coroutine = parent.CreateCoroutine(parent.Globals[funcName]).Coroutine; | ||||
|  | ||||
|             if (coroutine != null) | ||||
|   | ||||
| @@ -253,6 +253,9 @@ namespace FFXIVClassic_Map_Server | ||||
|         { | ||||
|             List<LuaParam> luaParams = new List<LuaParam>(); | ||||
|  | ||||
|             if (fromScript == null) | ||||
|                 return luaParams; | ||||
|  | ||||
|             if (fromScript.Type == DataType.Tuple) | ||||
|             { | ||||
|                 foreach (DynValue d in fromScript.Tuple) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user