aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/6643_world_gameobject_template.sql5
-rw-r--r--sql/world.sql2
-rw-r--r--src/game/GameObject.cpp2
-rw-r--r--src/game/GameObject.h2
4 files changed, 8 insertions, 3 deletions
diff --git a/sql/updates/6643_world_gameobject_template.sql b/sql/updates/6643_world_gameobject_template.sql
new file mode 100644
index 00000000000..4eda62ba17b
--- /dev/null
+++ b/sql/updates/6643_world_gameobject_template.sql
@@ -0,0 +1,5 @@
+-- Alter data1 column in gameobject_template to allow signed value
+ALTER TABLE `gameobject_template` CHANGE `data1` `data1temp` INT(10);
+ALTER TABLE `gameobject_template` ADD `data1` INT SIGNED NOT NULL DEFAULT '-1' AFTER `data0`;
+UPDATE `gameobject_template` SET `data1` = `data1temp`;
+ALTER TABLE `gameobject_template` DROP `data1temp`;
diff --git a/sql/world.sql b/sql/world.sql
index 8b24229629e..da84099a59e 100644
--- a/sql/world.sql
+++ b/sql/world.sql
@@ -1141,7 +1141,7 @@ CREATE TABLE `gameobject_template` (
`questItem5` int(11) unsigned NOT NULL default '0',
`questItem6` int(11) unsigned NOT NULL default '0',
`data0` int(10) unsigned NOT NULL default '0',
- `data1` int(10) unsigned NOT NULL default '0',
+ `data1` int(10) signed NOT NULL default '-1',
`data2` int(10) unsigned NOT NULL default '0',
`data3` int(10) unsigned NOT NULL default '0',
`data4` int(10) unsigned NOT NULL default '0',
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index 02a3ede06aa..a659fdb3209 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -824,7 +824,7 @@ bool GameObject::ActivateToQuest(Player *pTarget) const
}
case GAMEOBJECT_TYPE_GOOBER:
{
- if (pTarget->GetQuestStatus(GetGOInfo()->goober.questId) == QUEST_STATUS_INCOMPLETE)
+ if (pTarget->GetQuestStatus(GetGOInfo()->goober.questId) == QUEST_STATUS_INCOMPLETE || GetGOInfo()->goober.questId == -1)
return true;
break;
}
diff --git a/src/game/GameObject.h b/src/game/GameObject.h
index 7d55afb7e60..bc168a3eda4 100644
--- a/src/game/GameObject.h
+++ b/src/game/GameObject.h
@@ -170,7 +170,7 @@ struct GameObjectInfo
struct
{
uint32 lockId; //0 -> Lock.dbc
- uint32 questId; //1
+ int32 questId; //1
uint32 eventId; //2
uint32 autoCloseTime; //3
uint32 customAnim; //4