mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	Removed unused var in ItemRefParam. Fixed up the tracked vars in PassiveGL
This commit is contained in:
		| @@ -22,6 +22,7 @@ along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>. | |||||||
| using Meteor.Map.dataobjects; | using Meteor.Map.dataobjects; | ||||||
| using Meteor.Map.DataObjects; | using Meteor.Map.DataObjects; | ||||||
| using Newtonsoft.Json; | using Newtonsoft.Json; | ||||||
|  | using System; | ||||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||||
|  |  | ||||||
| namespace Meteor.Map.Actors | namespace Meteor.Map.Actors | ||||||
| @@ -31,7 +32,7 @@ namespace Meteor.Map.Actors | |||||||
|         private Recipe targetRecipe; |         private Recipe targetRecipe; | ||||||
|  |  | ||||||
|         private byte currentDifficulty; |         private byte currentDifficulty; | ||||||
|         private short numSuccesses; |         private short currentCrafted; | ||||||
|         private short currentAttempt; |         private short currentAttempt; | ||||||
|  |  | ||||||
|         private bool hasMaterials; |         private bool hasMaterials; | ||||||
| @@ -45,7 +46,7 @@ namespace Meteor.Map.Actors | |||||||
|             targetRecipe = Server.ResolveRecipe().GetRecipeByItemID(passiveGLData.objectiveItemId[currentDifficulty]); |             targetRecipe = Server.ResolveRecipe().GetRecipeByItemID(passiveGLData.objectiveItemId[currentDifficulty]); | ||||||
|             this.currentDifficulty = currentDifficulty; |             this.currentDifficulty = currentDifficulty; | ||||||
|             currentAttempt = 0; |             currentAttempt = 0; | ||||||
|             numSuccesses = 0; |             currentCrafted = 0; | ||||||
|             hasMaterials = false; |             hasMaterials = false; | ||||||
|         } |         } | ||||||
|  |  | ||||||
| @@ -61,9 +62,9 @@ namespace Meteor.Map.Actors | |||||||
|             if (questData == null) |             if (questData == null) | ||||||
|                 questData = new Dictionary<string, object>(); |                 questData = new Dictionary<string, object>(); | ||||||
|  |  | ||||||
|             currentDifficulty = questData.ContainsKey("currentDifficulty") ? (byte)questData["currentDifficulty"] : (byte)0; |             currentDifficulty = questData.ContainsKey("currentDifficulty") ? (byte)Convert.ToByte(questData["currentDifficulty"]) : (byte)0; | ||||||
|             currentAttempt = questData.ContainsKey("currentAttempt") ? (short)questData["currentAttempt"] : (short)0; |             currentAttempt = questData.ContainsKey("currentAttempt") ? (short)Convert.ToInt16(questData["currentAttempt"]) : (short)0; | ||||||
|             numSuccesses = questData.ContainsKey("numSuccesses") ? (short)questData["numSuccesses"] : (short)0; |             currentCrafted = questData.ContainsKey("currentCrafted") ? (short)Convert.ToInt16(questData["currentCrafted"]) : (short)0; | ||||||
|             hasMaterials = questData.ContainsKey("hasMaterials") ? (bool)questData["hasMaterials"] : false; |             hasMaterials = questData.ContainsKey("hasMaterials") ? (bool)questData["hasMaterials"] : false; | ||||||
|  |  | ||||||
|             targetRecipe = Server.ResolveRecipe().GetRecipeByItemID(passiveGLData.objectiveItemId[currentDifficulty]); |             targetRecipe = Server.ResolveRecipe().GetRecipeByItemID(passiveGLData.objectiveItemId[currentDifficulty]); | ||||||
| @@ -71,7 +72,7 @@ namespace Meteor.Map.Actors | |||||||
|  |  | ||||||
|         public void CraftSuccess() |         public void CraftSuccess() | ||||||
|         { |         { | ||||||
|             numSuccesses++; |             currentCrafted += (short) targetRecipe.resultQuantity; | ||||||
|             currentAttempt++; |             currentAttempt++; | ||||||
|         } |         } | ||||||
|  |  | ||||||
| @@ -85,9 +86,14 @@ namespace Meteor.Map.Actors | |||||||
|             return targetRecipe; |             return targetRecipe; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         public int GetNumberOfSuccesses() |         public int GetObjectiveQuantity() | ||||||
|         { |         { | ||||||
|             return numSuccesses; |             return passiveGLData.objectiveQuantity[currentDifficulty]; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         public int getCurrentCrafted() | ||||||
|  |         { | ||||||
|  |             return currentCrafted; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         public int GetRemainingMaterials() |         public int GetRemainingMaterials() | ||||||
| @@ -130,7 +136,7 @@ namespace Meteor.Map.Actors | |||||||
|             { |             { | ||||||
|                 { "currentDifficulty", currentDifficulty }, |                 { "currentDifficulty", currentDifficulty }, | ||||||
|                 { "currentAttempt", currentAttempt }, |                 { "currentAttempt", currentAttempt }, | ||||||
|                 { "itemsCompleted", numSuccesses }, |                 { "currentCrafted", currentCrafted }, | ||||||
|                 { "hasMaterials", hasMaterials } |                 { "hasMaterials", hasMaterials } | ||||||
|             }; |             }; | ||||||
|             return JsonConvert.SerializeObject(questData, Formatting.Indented); |             return JsonConvert.SerializeObject(questData, Formatting.Indented); | ||||||
|   | |||||||
| @@ -37,14 +37,12 @@ namespace Meteor.Map | |||||||
|         public class ItemRefParam |         public class ItemRefParam | ||||||
|         { |         { | ||||||
|             public uint actorId; |             public uint actorId; | ||||||
|             public byte unknown; |  | ||||||
|             public ushort slot; |             public ushort slot; | ||||||
|             public byte itemPackage; |             public byte itemPackage; | ||||||
|  |  | ||||||
|             public ItemRefParam(uint actorId, ushort slot, byte itemPackage) |             public ItemRefParam(uint actorId, ushort slot, byte itemPackage) | ||||||
|             { |             { | ||||||
|                 this.actorId = actorId; |                 this.actorId = actorId; | ||||||
|                 this.unknown = unknown; |  | ||||||
|                 this.slot = slot; |                 this.slot = slot; | ||||||
|                 this.itemPackage = itemPackage; |                 this.itemPackage = itemPackage; | ||||||
|             } |             } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user