mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	Merge branch 'develop' of https://bitbucket.org/Ioncannon/ffxiv-classic-server into ai
# Conflicts: # FFXIVClassic Map Server/Database.cs # FFXIVClassic Map Server/WorldManager.cs # FFXIVClassic Map Server/actors/area/Area.cs # FFXIVClassic Map Server/actors/chara/player/Player.cs
This commit is contained in:
		| @@ -46,14 +46,24 @@ namespace FFXIVClassic_Map_Server.actors.chara.player | ||||
|                 return null; | ||||
|         } | ||||
|  | ||||
|         public InventoryItem GetItemById(ulong itemId) | ||||
|         public InventoryItem GetItemByUniqueId(ulong uniqueItemId) | ||||
|         { | ||||
|             foreach (InventoryItem item in list) | ||||
|             { | ||||
|                 if (item.uniqueId == itemId) | ||||
|             { | ||||
|                 if (item.uniqueId == uniqueItemId) | ||||
|                     return item; | ||||
|             } | ||||
|             return null; | ||||
|         } | ||||
|  | ||||
|         public InventoryItem GetItemByCatelogId(ulong catelogId) | ||||
|         { | ||||
|             foreach (InventoryItem item in list) | ||||
|             { | ||||
|                 if (item.itemId == catelogId) | ||||
|                     return item; | ||||
|             } | ||||
|             return null; | ||||
|         } | ||||
|  | ||||
|         public void RefreshItem(InventoryItem item) | ||||
| @@ -262,7 +272,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.player | ||||
|             owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId)); | ||||
|         } | ||||
|  | ||||
|         public void RemoveItem(ulong itemDBId) | ||||
|         public void RemoveItemByUniqueId(ulong itemDBId) | ||||
|         { | ||||
|             ushort slot = 0; | ||||
|             InventoryItem toDelete = null; | ||||
| @@ -304,7 +314,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.player | ||||
|  | ||||
|         } | ||||
|  | ||||
|         public void RemoveItem(ushort slot) | ||||
|         public void RemoveItemAtSlot(ushort slot) | ||||
|         { | ||||
|             if (slot >= list.Count) | ||||
|                 return; | ||||
|   | ||||
| @@ -1,5 +1,4 @@ | ||||
| using FFXIVClassic.Common; | ||||
|  | ||||
| using FFXIVClassic_Map_Server.actors.chara.player; | ||||
| using FFXIVClassic_Map_Server.actors.director; | ||||
| using FFXIVClassic_Map_Server.dataobjects; | ||||
| @@ -8,6 +7,9 @@ using FFXIVClassic_Map_Server.lua; | ||||
| using FFXIVClassic_Map_Server.packets.send; | ||||
| using FFXIVClassic_Map_Server.packets.send.actor; | ||||
| using FFXIVClassic_Map_Server.packets.send.events; | ||||
| using FFXIVClassic_Map_Server.packets.send.actor.events; | ||||
| using FFXIVClassic_Map_Server.packets.send.actor.inventory; | ||||
| using FFXIVClassic_Map_Server.packets.send.events; | ||||
| using FFXIVClassic_Map_Server.packets.send.player; | ||||
| using FFXIVClassic_Map_Server.utils; | ||||
| using System; | ||||
| @@ -330,6 +332,7 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|                     subpackets.Add(SetHasGoobbuePacket.BuildPacket(actorId, hasGoobbue)); | ||||
|  | ||||
|                 subpackets.Add(SetAchievementPointsPacket.BuildPacket(actorId, achievementPoints)); | ||||
|  | ||||
|                 subpackets.Add(Database.GetLatestAchievements(this)); | ||||
|                 subpackets.Add(Database.GetAchievementsPacket(this));                 | ||||
|             } | ||||
| @@ -541,6 +544,7 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|             playerSession.QueuePacket(worldMasterSpawn); | ||||
|  | ||||
|             //Inn Packets (Dream, Cutscenes, Armoire) | ||||
|  | ||||
|             if (zone.isInn) | ||||
|             { | ||||
|                 SetCutsceneBookPacket cutsceneBookPacket = new SetCutsceneBookPacket(); | ||||
| @@ -567,7 +571,6 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|  | ||||
|             if (currentContentGroup != null) | ||||
|                 currentContentGroup.SendGroupPackets(playerSession); | ||||
|  | ||||
|         } | ||||
|  | ||||
|         private void SendRemoveInventoryPackets(List<ushort> slots) | ||||
| @@ -598,6 +601,7 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|         }         | ||||
|  | ||||
|         public void QueuePacket(SubPacket packet) | ||||
|  | ||||
|         { | ||||
|             playerSession.QueuePacket(packet); | ||||
|         } | ||||
| @@ -1006,6 +1010,7 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|             else | ||||
|             { | ||||
|                 ItemData item = Server.GetItemGamedata(invItem.itemId); | ||||
|  | ||||
|                 if (item is EquipmentItem) | ||||
|                 { | ||||
|                     EquipmentItem eqItem = (EquipmentItem)item; | ||||
| @@ -1040,7 +1045,6 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|             } | ||||
|  | ||||
|             Database.SavePlayerAppearance(this); | ||||
|  | ||||
|             BroadcastPacket(CreateAppearancePacket(), true); | ||||
|         } | ||||
|  | ||||
| @@ -1052,6 +1056,14 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|                 return null; | ||||
|         } | ||||
|  | ||||
|         public int GetCurrentGil() | ||||
|         { | ||||
|             if (GetInventory(Inventory.CURRENCY).HasItem(1000001)) | ||||
|                 return GetInventory(Inventory.CURRENCY).GetItemByCatelogId(1000001).quantity; | ||||
|             else | ||||
|                 return 0; | ||||
|         } | ||||
|  | ||||
|         public Actor GetActorInInstance(uint actorId) | ||||
|         { | ||||
|             foreach (Actor a in playerSession.actorInstanceList) | ||||
| @@ -1565,7 +1577,7 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|         public void SendDataPacket(params object[] parameters) | ||||
|         { | ||||
|             List<LuaParam> lParams = LuaUtils.CreateLuaParamList(parameters); | ||||
|             SubPacket spacket = InfoRequestResponsePacket.BuildPacket(actorId, lParams); | ||||
|             SubPacket spacket = GenericDataPacket.BuildPacket(actorId, lParams); | ||||
|             spacket.DebugPrintSubPacket(); | ||||
|             QueuePacket(spacket); | ||||
|         } | ||||
| @@ -1719,6 +1731,19 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|             LuaEngine.GetInstance().CallLuaFunction(this, this, "OnUpdate", true, delta); | ||||
|         } | ||||
|  | ||||
|         public void IssueChocobo(byte appearanceId, string nameResponse) | ||||
|         { | ||||
|             Database.IssuePlayerChocobo(this, appearanceId, nameResponse); | ||||
|             hasChocobo = true; | ||||
|             chocoboAppearance = appearanceId; | ||||
|             chocoboName = nameResponse; | ||||
|         } | ||||
|  | ||||
|         public void ChangeChocoboAppearance(byte appearanceId) | ||||
|         { | ||||
|             Database.ChangePlayerChocoboAppearance(this, appearanceId); | ||||
|             chocoboAppearance = appearanceId; | ||||
|         } | ||||
|         public override void Update(DateTime tick) | ||||
|         { | ||||
|             aiContainer.Update(tick); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user