From 95efc3a66c2c5937867e077905d2a5c66a8b1559 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Thu, 8 Dec 2016 16:06:32 -0500 Subject: [PATCH 1/7] Undo changes --- zone/attack.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/zone/attack.cpp b/zone/attack.cpp index 475aee7b3..3b69380f0 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -1217,8 +1217,14 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b CommonBreakInvisibleFromCombat(); + // Defensive procs from opponent happen here. + // We, the attacker check for them and make them happen. + // Added 2nd check for spell based defensive procs on opponent. if(GetTarget()) + { TriggerDefensiveProcs(other, Hand, true, damage); + TriggerDefensiveProcs(other, Hand, false); + } if (damage > 0) return true; @@ -1783,8 +1789,14 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool TrySkillProc(other, skillinuse, 0, true, Hand); } + // Defensive procs from opponent happen here. + // We, the attacker check for them and make them happen. + // Added 2nd check for spell based defensive procs on opponent. if(GetHP() > 0 && !other->HasDied()) + { TriggerDefensiveProcs(other, Hand, true, damage); + TriggerDefensiveProcs(other, Hand, false); + } if (damage > 0) return true; From 246f770e8f80865a2d93b6ccd4b34d6069e93300 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sun, 27 Nov 2016 16:43:43 -0500 Subject: [PATCH 2/7] Fix fishing messages so when actual fish are caught, name is in message. --- zone/forage.cpp | 14 +++++++++++++- zone/string_ids.h | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/zone/forage.cpp b/zone/forage.cpp index aec4d6b73..8331560fd 100644 --- a/zone/forage.cpp +++ b/zone/forage.cpp @@ -221,6 +221,8 @@ bool Client::CanFish() { void Client::GoFish() { + bool junk=false; + //TODO: generate a message if we're already fishing /*if (!fishing_timer.Check()) { //this isn't the right check, may need to add something to the Client class like 'bool is_fishing' Message_StringID(0, ALREADY_FISHING); //You are already fishing! @@ -302,11 +304,21 @@ void Client::GoFish() if(food_id == 0) { int index = zone->random.Int(0, MAX_COMMON_FISH_IDS-1); food_id = common_fish_ids[index]; + if (food_id != 13019) { + junk=true; // Alters the message to "caught something..." + } + } const EQEmu::ItemData* food_item = database.GetItem(food_id); - Message_StringID(MT_Skills, FISHING_SUCCESS); + if (junk == true) { + Message_StringID(MT_Skills, FISHING_SUCCESS); + } + else { + Message_StringID(MT_Skills, FISHING_SUCCESS_FISH_NAME, food_item->Name); + } + EQEmu::ItemInstance* inst = database.CreateItem(food_item, 1); if(inst != nullptr) { if(CheckLoreConflict(inst->GetItem())) diff --git a/zone/string_ids.h b/zone/string_ids.h index b9eba66df..67dd808ab 100644 --- a/zone/string_ids.h +++ b/zone/string_ids.h @@ -46,6 +46,7 @@ #define FISHING_FAILED 168 //You didn't catch anything. #define FISHING_POLE_BROKE 169 //Your fishing pole broke! #define FISHING_SUCCESS 170 //You caught, something... +#define FISHING_SUCCESS_FISH_NAME 421 //You caught %1! #define FISHING_SPILL_BEER 171 //You spill your beer while bringing in your line. #define FISHING_LOST_BAIT 172 //You lost your bait! #define SPELL_FIZZLE 173 //Your spell fizzles! From f5a0b994dc422b46c9e19e0802fd74d1ec11caa7 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sun, 27 Nov 2016 17:02:19 -0500 Subject: [PATCH 3/7] Make message based on item type. Learned that non fish items can come from both tables. --- zone/forage.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/zone/forage.cpp b/zone/forage.cpp index 8331560fd..92fde80b5 100644 --- a/zone/forage.cpp +++ b/zone/forage.cpp @@ -221,8 +221,6 @@ bool Client::CanFish() { void Client::GoFish() { - bool junk=false; - //TODO: generate a message if we're already fishing /*if (!fishing_timer.Check()) { //this isn't the right check, may need to add something to the Client class like 'bool is_fishing' Message_StringID(0, ALREADY_FISHING); //You are already fishing! @@ -304,15 +302,13 @@ void Client::GoFish() if(food_id == 0) { int index = zone->random.Int(0, MAX_COMMON_FISH_IDS-1); food_id = common_fish_ids[index]; - if (food_id != 13019) { - junk=true; // Alters the message to "caught something..." } } const EQEmu::ItemData* food_item = database.GetItem(food_id); - if (junk == true) { + if (food_item->ItemType != ItemTypeFood) { // non-fish oddity Message_StringID(MT_Skills, FISHING_SUCCESS); } else { From d99df2540d11c33bd01822e15e70a2f8e08d13a3 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sun, 27 Nov 2016 17:17:26 -0500 Subject: [PATCH 4/7] Fix typo --- zone/forage.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/zone/forage.cpp b/zone/forage.cpp index 92fde80b5..7bb87bf6c 100644 --- a/zone/forage.cpp +++ b/zone/forage.cpp @@ -303,12 +303,10 @@ void Client::GoFish() int index = zone->random.Int(0, MAX_COMMON_FISH_IDS-1); food_id = common_fish_ids[index]; } - - } const EQEmu::ItemData* food_item = database.GetItem(food_id); - if (food_item->ItemType != ItemTypeFood) { // non-fish oddity + if (food_item->ItemType != EQEmu::item::ItemTypeFood) { Message_StringID(MT_Skills, FISHING_SUCCESS); } else { From 6cbb4bcf478f2e10c22c1e4b1606783503ab81f7 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Thu, 8 Dec 2016 16:15:58 -0500 Subject: [PATCH 5/7] Remove defensive proc changes --- zone/attack.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 3b69380f0..3359f4eed 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -1223,7 +1223,6 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b if(GetTarget()) { TriggerDefensiveProcs(other, Hand, true, damage); - TriggerDefensiveProcs(other, Hand, false); } if (damage > 0) @@ -1795,7 +1794,6 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool if(GetHP() > 0 && !other->HasDied()) { TriggerDefensiveProcs(other, Hand, true, damage); - TriggerDefensiveProcs(other, Hand, false); } if (damage > 0) From d0e6bb6e072a19ce5d71a27604700ad2d913afd1 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Thu, 8 Dec 2016 16:17:10 -0500 Subject: [PATCH 6/7] more undos --- zone/attack.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 3359f4eed..475aee7b3 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -1217,13 +1217,8 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b CommonBreakInvisibleFromCombat(); - // Defensive procs from opponent happen here. - // We, the attacker check for them and make them happen. - // Added 2nd check for spell based defensive procs on opponent. if(GetTarget()) - { TriggerDefensiveProcs(other, Hand, true, damage); - } if (damage > 0) return true; @@ -1788,13 +1783,8 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool TrySkillProc(other, skillinuse, 0, true, Hand); } - // Defensive procs from opponent happen here. - // We, the attacker check for them and make them happen. - // Added 2nd check for spell based defensive procs on opponent. if(GetHP() > 0 && !other->HasDied()) - { TriggerDefensiveProcs(other, Hand, true, damage); - } if (damage > 0) return true; From 538ff873ee73a447786af834e75837343b7e2a87 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Thu, 8 Dec 2016 16:19:17 -0500 Subject: [PATCH 7/7] Fix alignment --- zone/forage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/forage.cpp b/zone/forage.cpp index 7bb87bf6c..cce6d9694 100644 --- a/zone/forage.cpp +++ b/zone/forage.cpp @@ -302,7 +302,7 @@ void Client::GoFish() if(food_id == 0) { int index = zone->random.Int(0, MAX_COMMON_FISH_IDS-1); food_id = common_fish_ids[index]; - } + } const EQEmu::ItemData* food_item = database.GetItem(food_id);