SQL: Changed data fields in gameobject_template to allow int32s

(cherry picked from commit b485dc78b1)
This commit is contained in:
Kinzcool
2014-10-30 22:21:06 -04:00
committed by Shauren
parent 1ceaa9f9d9
commit 4a90aee2e3
4 changed files with 42 additions and 18 deletions

View File

@@ -0,0 +1,24 @@
ALTER TABLE `gameobject_template` CHANGE `data0` `Data0` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data1` `Data1` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data2` `Data2` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data3` `Data3` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data4` `Data4` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data5` `Data5` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data6` `Data6` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data7` `Data7` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data8` `Data8` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data9` `Data9` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data10` `Data10` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data11` `Data11` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data12` `Data12` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data13` `Data13` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data14` `Data14` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data15` `Data15` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data16` `Data16` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data17` `Data17` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data18` `Data18` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data19` `Data19` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data20` `Data20` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data21` `Data21` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data22` `Data22` INT NOT NULL DEFAULT '0';
ALTER TABLE `gameobject_template` CHANGE `data23` `Data23` INT NOT NULL DEFAULT '0';

View File

@@ -203,7 +203,7 @@ struct GameObjectTemplate
uint32 autoCloseTime; //2 secs till autoclose = autoCloseTime / 0x10000
uint32 pause1EventID; //3
uint32 pause2EventID; //4
uint32 mapID; //5
int32 mapID; //5
} transport;
//12 GAMEOBJECT_TYPE_AREADAMAGE
struct
@@ -236,7 +236,7 @@ struct GameObjectTemplate
uint32 startEventID; //3
uint32 stopEventID; //4
uint32 transportPhysics; //5
uint32 mapID; //6
int32 mapID; //6
uint32 worldState1; //7
uint32 canBeStopped; //8
} moTransport;
@@ -271,7 +271,7 @@ struct GameObjectTemplate
struct
{
uint32 spellId; //0
uint32 charges; //1
int32 charges; //1
uint32 partyOnly; //2
uint32 allowMounted; //3 Is usable while on mount/vehicle. (0/1)
uint32 large; //4
@@ -361,14 +361,14 @@ struct GameObjectTemplate
//31 GAMEOBJECT_TYPE_DUNGEON_DIFFICULTY
struct
{
uint32 mapID; //0
int32 mapID; //0
uint32 difficulty; //1
} dungeonDifficulty;
//32 GAMEOBJECT_TYPE_BARBER_CHAIR
struct
{
uint32 chairheight; //0
uint32 heightOffset; //1
int32 heightOffset; //1
} barberChair;
//33 GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING
struct
@@ -380,21 +380,21 @@ struct GameObjectTemplate
uint32 empty2; //4
uint32 damagedNumHits; //5
uint32 empty3; //6
uint32 empty4; //7
uint32 empty5; //8
int32 empty4; //7
int32 empty5; //8
uint32 damagedEvent; //9
uint32 empty6; //10
uint32 empty7; //11
uint32 empty8; //12
uint32 empty9; //13
int32 empty6; //10
int32 empty7; //11
int32 empty8; //12
int32 empty9; //13
uint32 destroyedEvent; //14
uint32 empty10; //15
int32 empty10; //15
uint32 rebuildingTimeSecs; //16
uint32 empty11; //17
int32 empty11; //17
uint32 destructibleData; //18
uint32 rebuildingEvent; //19
uint32 empty12; //20
uint32 empty13; //21
int32 empty12; //20
int32 empty13; //21
uint32 damageEvent; //22
uint32 empty14; //23
} building;

View File

@@ -72,7 +72,7 @@ void TransportMgr::LoadTransportTemplates()
if (goInfo->moTransport.taxiPathId >= sTaxiPathNodesByPath.size())
{
TC_LOG_ERROR("sql.sql", "Transport {} (name: {}) has an invalid path specified in `gameobject_template`.`data0` ({}) field, skipped.", entry, goInfo->name, goInfo->moTransport.taxiPathId);
TC_LOG_ERROR("sql.sql", "Transport {} (name: {}) has an invalid path specified in `gameobject_template`.`Data0` ({}) field, skipped.", entry, goInfo->name, goInfo->moTransport.taxiPathId);
continue;
}

View File

@@ -381,8 +381,8 @@ class instance_icecrown_citadel : public InstanceMapScript
break;
case NPC_ZAFOD_BOOMBOX:
if (GameObjectTemplate const* go = sObjectMgr->GetGameObjectTemplate(GO_THE_SKYBREAKER_A))
if ((TeamInInstance == ALLIANCE && data->mapId == go->moTransport.mapID) ||
(TeamInInstance == HORDE && data->mapId != go->moTransport.mapID))
if ((TeamInInstance == ALLIANCE && int32(data->mapId) == go->moTransport.mapID) ||
(TeamInInstance == HORDE && int32(data->mapId) != go->moTransport.mapID))
return entry;
return 0;
case NPC_IGB_MURADIN_BRONZEBEARD: