Skip to content

Commit 4a90aee

Browse files
KinzcoolShauren
authored andcommitted
SQL: Changed data fields in gameobject_template to allow int32s
(cherry picked from commit b485dc7)
1 parent 1ceaa9f commit 4a90aee

File tree

4 files changed

+42
-18
lines changed

4 files changed

+42
-18
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
ALTER TABLE `gameobject_template` CHANGE `data0` `Data0` INT NOT NULL DEFAULT '0';
2+
ALTER TABLE `gameobject_template` CHANGE `data1` `Data1` INT NOT NULL DEFAULT '0';
3+
ALTER TABLE `gameobject_template` CHANGE `data2` `Data2` INT NOT NULL DEFAULT '0';
4+
ALTER TABLE `gameobject_template` CHANGE `data3` `Data3` INT NOT NULL DEFAULT '0';
5+
ALTER TABLE `gameobject_template` CHANGE `data4` `Data4` INT NOT NULL DEFAULT '0';
6+
ALTER TABLE `gameobject_template` CHANGE `data5` `Data5` INT NOT NULL DEFAULT '0';
7+
ALTER TABLE `gameobject_template` CHANGE `data6` `Data6` INT NOT NULL DEFAULT '0';
8+
ALTER TABLE `gameobject_template` CHANGE `data7` `Data7` INT NOT NULL DEFAULT '0';
9+
ALTER TABLE `gameobject_template` CHANGE `data8` `Data8` INT NOT NULL DEFAULT '0';
10+
ALTER TABLE `gameobject_template` CHANGE `data9` `Data9` INT NOT NULL DEFAULT '0';
11+
ALTER TABLE `gameobject_template` CHANGE `data10` `Data10` INT NOT NULL DEFAULT '0';
12+
ALTER TABLE `gameobject_template` CHANGE `data11` `Data11` INT NOT NULL DEFAULT '0';
13+
ALTER TABLE `gameobject_template` CHANGE `data12` `Data12` INT NOT NULL DEFAULT '0';
14+
ALTER TABLE `gameobject_template` CHANGE `data13` `Data13` INT NOT NULL DEFAULT '0';
15+
ALTER TABLE `gameobject_template` CHANGE `data14` `Data14` INT NOT NULL DEFAULT '0';
16+
ALTER TABLE `gameobject_template` CHANGE `data15` `Data15` INT NOT NULL DEFAULT '0';
17+
ALTER TABLE `gameobject_template` CHANGE `data16` `Data16` INT NOT NULL DEFAULT '0';
18+
ALTER TABLE `gameobject_template` CHANGE `data17` `Data17` INT NOT NULL DEFAULT '0';
19+
ALTER TABLE `gameobject_template` CHANGE `data18` `Data18` INT NOT NULL DEFAULT '0';
20+
ALTER TABLE `gameobject_template` CHANGE `data19` `Data19` INT NOT NULL DEFAULT '0';
21+
ALTER TABLE `gameobject_template` CHANGE `data20` `Data20` INT NOT NULL DEFAULT '0';
22+
ALTER TABLE `gameobject_template` CHANGE `data21` `Data21` INT NOT NULL DEFAULT '0';
23+
ALTER TABLE `gameobject_template` CHANGE `data22` `Data22` INT NOT NULL DEFAULT '0';
24+
ALTER TABLE `gameobject_template` CHANGE `data23` `Data23` INT NOT NULL DEFAULT '0';

src/server/game/Entities/GameObject/GameObjectData.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ struct GameObjectTemplate
203203
uint32 autoCloseTime; //2 secs till autoclose = autoCloseTime / 0x10000
204204
uint32 pause1EventID; //3
205205
uint32 pause2EventID; //4
206-
uint32 mapID; //5
206+
int32 mapID; //5
207207
} transport;
208208
//12 GAMEOBJECT_TYPE_AREADAMAGE
209209
struct
@@ -236,7 +236,7 @@ struct GameObjectTemplate
236236
uint32 startEventID; //3
237237
uint32 stopEventID; //4
238238
uint32 transportPhysics; //5
239-
uint32 mapID; //6
239+
int32 mapID; //6
240240
uint32 worldState1; //7
241241
uint32 canBeStopped; //8
242242
} moTransport;
@@ -271,7 +271,7 @@ struct GameObjectTemplate
271271
struct
272272
{
273273
uint32 spellId; //0
274-
uint32 charges; //1
274+
int32 charges; //1
275275
uint32 partyOnly; //2
276276
uint32 allowMounted; //3 Is usable while on mount/vehicle. (0/1)
277277
uint32 large; //4
@@ -361,14 +361,14 @@ struct GameObjectTemplate
361361
//31 GAMEOBJECT_TYPE_DUNGEON_DIFFICULTY
362362
struct
363363
{
364-
uint32 mapID; //0
364+
int32 mapID; //0
365365
uint32 difficulty; //1
366366
} dungeonDifficulty;
367367
//32 GAMEOBJECT_TYPE_BARBER_CHAIR
368368
struct
369369
{
370370
uint32 chairheight; //0
371-
uint32 heightOffset; //1
371+
int32 heightOffset; //1
372372
} barberChair;
373373
//33 GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING
374374
struct
@@ -380,21 +380,21 @@ struct GameObjectTemplate
380380
uint32 empty2; //4
381381
uint32 damagedNumHits; //5
382382
uint32 empty3; //6
383-
uint32 empty4; //7
384-
uint32 empty5; //8
383+
int32 empty4; //7
384+
int32 empty5; //8
385385
uint32 damagedEvent; //9
386-
uint32 empty6; //10
387-
uint32 empty7; //11
388-
uint32 empty8; //12
389-
uint32 empty9; //13
386+
int32 empty6; //10
387+
int32 empty7; //11
388+
int32 empty8; //12
389+
int32 empty9; //13
390390
uint32 destroyedEvent; //14
391-
uint32 empty10; //15
391+
int32 empty10; //15
392392
uint32 rebuildingTimeSecs; //16
393-
uint32 empty11; //17
393+
int32 empty11; //17
394394
uint32 destructibleData; //18
395395
uint32 rebuildingEvent; //19
396-
uint32 empty12; //20
397-
uint32 empty13; //21
396+
int32 empty12; //20
397+
int32 empty13; //21
398398
uint32 damageEvent; //22
399399
uint32 empty14; //23
400400
} building;

src/server/game/Maps/TransportMgr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void TransportMgr::LoadTransportTemplates()
7272

7373
if (goInfo->moTransport.taxiPathId >= sTaxiPathNodesByPath.size())
7474
{
75-
TC_LOG_ERROR("sql.sql", "Transport {} (name: {}) has an invalid path specified in `gameobject_template`.`data0` ({}) field, skipped.", entry, goInfo->name, goInfo->moTransport.taxiPathId);
75+
TC_LOG_ERROR("sql.sql", "Transport {} (name: {}) has an invalid path specified in `gameobject_template`.`Data0` ({}) field, skipped.", entry, goInfo->name, goInfo->moTransport.taxiPathId);
7676
continue;
7777
}
7878

src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ class instance_icecrown_citadel : public InstanceMapScript
381381
break;
382382
case NPC_ZAFOD_BOOMBOX:
383383
if (GameObjectTemplate const* go = sObjectMgr->GetGameObjectTemplate(GO_THE_SKYBREAKER_A))
384-
if ((TeamInInstance == ALLIANCE && data->mapId == go->moTransport.mapID) ||
385-
(TeamInInstance == HORDE && data->mapId != go->moTransport.mapID))
384+
if ((TeamInInstance == ALLIANCE && int32(data->mapId) == go->moTransport.mapID) ||
385+
(TeamInInstance == HORDE && int32(data->mapId) != go->moTransport.mapID))
386386
return entry;
387387
return 0;
388388
case NPC_IGB_MURADIN_BRONZEBEARD:

0 commit comments

Comments
 (0)