From d3fbd026b4be39e14b49c632c80ec6edb82d77e9 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 30 Oct 2014 22:08:45 -0400 Subject: [PATCH 1/3] Fix error with commit --- zone/attack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 3d05bad70..5e2baa117 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -1295,7 +1295,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b damage += opts->damage_flat; hate *= opts->hate_percent; hate += opts->hate_flat; - hit_chance_bonus += opts->hate_flat; + hit_chance_bonus += opts->hit_chance; } //check to see if we hit.. From 481492cb599113cfc636c065f3812286fdfd2b5d Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 30 Oct 2014 19:38:13 -0700 Subject: [PATCH 2/3] Fixed SQL to be current date, also it will no longer rely on a field that we removed from the db [skip ci] --- utils/sql/git/required/2014_10_16_special_abilities_null.sql | 4 ---- utils/sql/git/required/2014_10_30_special_abilities_null.sql | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 utils/sql/git/required/2014_10_16_special_abilities_null.sql create mode 100644 utils/sql/git/required/2014_10_30_special_abilities_null.sql diff --git a/utils/sql/git/required/2014_10_16_special_abilities_null.sql b/utils/sql/git/required/2014_10_16_special_abilities_null.sql deleted file mode 100644 index 8f92a114c..000000000 --- a/utils/sql/git/required/2014_10_16_special_abilities_null.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `merc_stats` MODIFY COLUMN `special_abilities` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL AFTER `attack_speed`; - -ALTER TABLE `npc_types` MODIFY COLUMN `special_abilities` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL AFTER `npcspecialattks`; - diff --git a/utils/sql/git/required/2014_10_30_special_abilities_null.sql b/utils/sql/git/required/2014_10_30_special_abilities_null.sql new file mode 100644 index 000000000..c9e52011d --- /dev/null +++ b/utils/sql/git/required/2014_10_30_special_abilities_null.sql @@ -0,0 +1,4 @@ +ALTER TABLE `merc_stats` MODIFY COLUMN `special_abilities` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL; + +ALTER TABLE `npc_types` MODIFY COLUMN `special_abilities` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL; + From b417e23d977285610664d43bd696d53a3cbf35eb Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 31 Oct 2014 00:02:05 -0400 Subject: [PATCH 3/3] Allow to set/del qglobals in encounters scripts --- zone/questmgr.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 90f0d370d..7757d0a70 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -1290,9 +1290,9 @@ void QuestManager::signal(int npc_id, int wait_ms) { void QuestManager::setglobal(const char *varname, const char *newvalue, int options, const char *duration) { QuestManagerCurrentQuestVars(); - int qgZoneid=zone->GetZoneID(); - int qgCharid=0; - int qgNpcid = owner->GetNPCTypeID(); + int qgZoneid = zone->GetZoneID(); + int qgCharid = 0; + int qgNpcid = owner ? owner->GetNPCTypeID() : 0; // encounter scripts don't have an owner /* options value determines the availability of global variables to NPCs when a quest begins ------------------------------------------------------------------ @@ -1410,9 +1410,9 @@ void QuestManager::targlobal(const char *varname, const char *value, const char void QuestManager::delglobal(const char *varname) { QuestManagerCurrentQuestVars(); - int qgZoneid=zone->GetZoneID(); - int qgCharid=0; - int qgNpcid=owner->GetNPCTypeID(); + int qgZoneid = zone->GetZoneID(); + int qgCharid = 0; + int qgNpcid = owner ? owner->GetNPCTypeID() : 0; // encounter scripts don't have an owner if (initiator && initiator->IsClient()) // some events like waypoint and spawn don't have a player involved qgCharid=initiator->CharacterID();