From 36120db400691be75199ff404e35f5c289b8818f Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Fri, 31 Jan 2014 19:46:51 +0100 Subject: Some updates for enchanting (2) --- src/ClientHandle.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index 4add022a6..1a1e22a19 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -214,6 +214,9 @@ public: /// Handles the block placing packet when it is a real block placement (not block-using, item-using or eating) void HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, cItemHandler & a_ItemHandler); + + ///Handle item enchanting + void HandleEnchantItem(Byte & WindowID, Byte & Enchantment); private: -- cgit v1.2.3 From 93a7494e4b32777c38bae863aaa9ac0a39a770eb Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Mon, 7 Apr 2014 20:11:43 +0200 Subject: Fixed merge conflict --- src/ClientHandle.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index 1a1e22a19..4add022a6 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -214,9 +214,6 @@ public: /// Handles the block placing packet when it is a real block placement (not block-using, item-using or eating) void HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, cItemHandler & a_ItemHandler); - - ///Handle item enchanting - void HandleEnchantItem(Byte & WindowID, Byte & Enchantment); private: -- cgit v1.2.3 From 296d0acbffc053b4edc4c4b02503603081180ecf Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Mon, 7 Apr 2014 20:13:45 +0200 Subject: Added deleted things for merging --- src/ClientHandle.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index 0c367ec7d..01765cc85 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -230,6 +230,9 @@ public: /** Called when the player moves into a different world; queues sreaming the new chunks */ void MoveToWorld(cWorld & a_World, bool a_SendRespawnPacket); + ///Handle item enchanting + void HandleEnchantItem(Byte & WindowID, Byte & Enchantment); + private: /** Handles the block placing packet when it is a real block placement (not block-using, item-using or eating) */ -- cgit v1.2.3 From e6e702e7fdbc8b7475d3dbecc0f81a08304997ae Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Sat, 12 Apr 2014 14:58:46 +0200 Subject: Added complete Enchanting System http://minecraft.gamepedia.com/Enchantment_mechanics --- src/ClientHandle.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index 01765cc85..4c88d79e2 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -18,6 +18,7 @@ #include "ByteBuffer.h" #include "Scoreboard.h" #include "Map.h" +#include "Enchantments.h" @@ -230,8 +231,10 @@ public: /** Called when the player moves into a different world; queues sreaming the new chunks */ void MoveToWorld(cWorld & a_World, bool a_SendRespawnPacket); - ///Handle item enchanting + /** Called when the player will enchant a Item */ void HandleEnchantItem(Byte & WindowID, Byte & Enchantment); + cEnchantmentsVector AddEnchantmentWeight(cEnchantmentsVector a_Map, int a_Weight, cEnchantments a_Enchantment); + cEnchantmentsVector CheckEnchantmentConflicts(cEnchantmentsVector a_Map, cEnchantments a_FirstEnchantment); private: -- cgit v1.2.3 From fce9ea65c35ab7f94c23bb361386b5ce223279eb Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Sun, 13 Apr 2014 22:15:10 +0200 Subject: Fixed invisibility enchantments --- src/ClientHandle.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index 4c88d79e2..b4b1d0da3 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -19,6 +19,7 @@ #include "Scoreboard.h" #include "Map.h" #include "Enchantments.h" +#include "UI/SlotArea.h" -- cgit v1.2.3 From fb3c755c0a6d1ccaae8e990375229afee4827e0c Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Tue, 15 Apr 2014 20:55:37 +0200 Subject: Modified names --- src/ClientHandle.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index b4b1d0da3..b9e470653 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -234,8 +234,8 @@ public: /** Called when the player will enchant a Item */ void HandleEnchantItem(Byte & WindowID, Byte & Enchantment); - cEnchantmentsVector AddEnchantmentWeight(cEnchantmentsVector a_Map, int a_Weight, cEnchantments a_Enchantment); - cEnchantmentsVector CheckEnchantmentConflicts(cEnchantmentsVector a_Map, cEnchantments a_FirstEnchantment); + cEnchantmentsVector AddEnchantmentWeight(cEnchantmentsVector a_Enchantments, int a_Weight, cEnchantments a_Enchantment); + cEnchantmentsVector CheckEnchantmentConflicts(cEnchantmentsVector a_Enchantments, cEnchantments a_FirstEnchantment); private: -- cgit v1.2.3 From 2cb8538e2e60309bc9d1f13dc90dd5cbface8967 Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Tue, 15 Apr 2014 22:03:15 +0200 Subject: Code Optimization --- src/ClientHandle.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index b9e470653..f6d0af3b4 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -234,8 +234,9 @@ public: /** Called when the player will enchant a Item */ void HandleEnchantItem(Byte & WindowID, Byte & Enchantment); - cEnchantmentsVector AddEnchantmentWeight(cEnchantmentsVector a_Enchantments, int a_Weight, cEnchantments a_Enchantment); - cEnchantmentsVector CheckEnchantmentConflicts(cEnchantmentsVector a_Enchantments, cEnchantments a_FirstEnchantment); + void AddEnchantmentWeight(cEnchantmentsVector & a_Enchantments, int a_Weight, cEnchantments a_Enchantment); + void RemoveEnchantmentFromVector(cEnchantmentsVector & a_Enchantments, int a_EnchantmentID); + void CheckEnchantmentConflicts(cEnchantmentsVector & a_Enchantments, cEnchantments a_FirstEnchantment); private: -- cgit v1.2.3 From a0725747af9581744577be7ed06c07ec9c9fe3f2 Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Wed, 16 Apr 2014 14:52:09 +0200 Subject: Fixed conflicting enchantments checking --- src/ClientHandle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index 8bba0d27c..1829e3b4d 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -249,7 +249,7 @@ public: /** Called when the player will enchant a Item */ void HandleEnchantItem(Byte & WindowID, Byte & Enchantment); void AddEnchantmentWeight(cEnchantmentsVector & a_Enchantments, int a_Weight, cEnchantments a_Enchantment); - void RemoveEnchantmentFromVector(cEnchantmentsVector & a_Enchantments, int a_EnchantmentID); + void RemoveEnchantmentFromVector(cEnchantmentsVector * a_Enchantments, int a_EnchantmentID); void CheckEnchantmentConflicts(cEnchantmentsVector & a_Enchantments, cEnchantments a_FirstEnchantment); private: -- cgit v1.2.3 From f9343a8490b50cb28a62c7327c0013da48ca2745 Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Thu, 17 Apr 2014 13:15:35 +0200 Subject: Modified many things --- src/ClientHandle.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index 1829e3b4d..3d01d8034 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -248,9 +248,6 @@ public: /** Called when the player will enchant a Item */ void HandleEnchantItem(Byte & WindowID, Byte & Enchantment); - void AddEnchantmentWeight(cEnchantmentsVector & a_Enchantments, int a_Weight, cEnchantments a_Enchantment); - void RemoveEnchantmentFromVector(cEnchantmentsVector * a_Enchantments, int a_EnchantmentID); - void CheckEnchantmentConflicts(cEnchantmentsVector & a_Enchantments, cEnchantments a_FirstEnchantment); private: -- cgit v1.2.3