diff options
16 files changed, 144 insertions, 69 deletions
diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql index c1437dcb847..b350b7b27fa 100644 --- a/sql/base/characters_database.sql +++ b/sql/base/characters_database.sql @@ -612,9 +612,9 @@ DROP TABLE IF EXISTS `character_homebind`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_homebind` ( - `guid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', - `map` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier', - `zone` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Zone Identifier', + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', + `map` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier', + `zone` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Zone Identifier', `position_x` float NOT NULL DEFAULT '0', `position_y` float NOT NULL DEFAULT '0', `position_z` float NOT NULL DEFAULT '0', @@ -639,9 +639,9 @@ DROP TABLE IF EXISTS `character_instance`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_instance` ( - `guid` int(11) unsigned NOT NULL DEFAULT '0', - `instance` int(11) unsigned NOT NULL DEFAULT '0', - `permanent` tinyint(1) unsigned NOT NULL DEFAULT '0', + `guid` int(10) unsigned NOT NULL DEFAULT '0', + `instance` int(10) unsigned NOT NULL DEFAULT '0', + `permanent` tinyint(3) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`guid`,`instance`), KEY `instance` (`instance`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -664,10 +664,10 @@ DROP TABLE IF EXISTS `character_inventory`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_inventory` ( - `guid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', - `bag` int(11) unsigned NOT NULL DEFAULT '0', + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', + `bag` int(10) unsigned NOT NULL DEFAULT '0', `slot` tinyint(3) unsigned NOT NULL DEFAULT '0', - `item` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Item Global Unique Identifier', + `item` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Item Global Unique Identifier', PRIMARY KEY (`item`), KEY `idx_guid` (`guid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; @@ -690,25 +690,25 @@ DROP TABLE IF EXISTS `character_pet`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_pet` ( - `id` int(11) unsigned NOT NULL DEFAULT '0', - `entry` int(11) unsigned NOT NULL DEFAULT '0', - `owner` int(11) unsigned NOT NULL DEFAULT '0', - `modelid` int(11) unsigned DEFAULT '0', - `CreatedBySpell` int(11) unsigned NOT NULL DEFAULT '0', + `id` int(10) unsigned NOT NULL DEFAULT '0', + `entry` int(10) unsigned NOT NULL DEFAULT '0', + `owner` int(10) unsigned NOT NULL DEFAULT '0', + `modelid` int(10) unsigned DEFAULT '0', + `CreatedBySpell` mediumint(8) unsigned NOT NULL DEFAULT '0', `PetType` tinyint(3) unsigned NOT NULL DEFAULT '0', - `level` int(11) unsigned NOT NULL DEFAULT '1', - `exp` int(11) unsigned NOT NULL DEFAULT '0', - `Reactstate` tinyint(1) unsigned NOT NULL DEFAULT '0', - `name` varchar(100) DEFAULT 'Pet', - `renamed` tinyint(1) unsigned NOT NULL DEFAULT '0', - `slot` int(11) unsigned NOT NULL DEFAULT '0', - `curhealth` int(11) unsigned NOT NULL DEFAULT '1', - `curmana` int(11) unsigned NOT NULL DEFAULT '0', - `curhappiness` int(11) unsigned NOT NULL DEFAULT '0', - `savetime` bigint(20) unsigned NOT NULL DEFAULT '0', - `resettalents_cost` int(11) unsigned NOT NULL DEFAULT '0', - `resettalents_time` bigint(20) unsigned NOT NULL DEFAULT '0', - `abdata` longtext, + `level` smallint(5) unsigned NOT NULL DEFAULT '1', + `exp` int(10) unsigned NOT NULL DEFAULT '0', + `Reactstate` tinyint(3) unsigned NOT NULL DEFAULT '0', + `name` varchar(21) NOT NULL DEFAULT 'Pet', + `renamed` tinyint(3) unsigned NOT NULL DEFAULT '0', + `slot` tinyint(3) unsigned NOT NULL DEFAULT '0', + `curhealth` int(10) unsigned NOT NULL DEFAULT '1', + `curmana` int(10) unsigned NOT NULL DEFAULT '0', + `curhappiness` int(10) unsigned NOT NULL DEFAULT '0', + `savetime` int(10) unsigned NOT NULL DEFAULT '0', + `resettalents_cost` int(10) unsigned NOT NULL DEFAULT '0', + `resettalents_time` int(10) unsigned NOT NULL DEFAULT '0', + `abdata` text, PRIMARY KEY (`id`), KEY `owner` (`owner`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Pet System'; @@ -731,8 +731,8 @@ DROP TABLE IF EXISTS `character_pet_declinedname`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_pet_declinedname` ( - `id` int(11) unsigned NOT NULL DEFAULT '0', - `owner` int(11) unsigned NOT NULL DEFAULT '0', + `id` int(10) unsigned NOT NULL DEFAULT '0', + `owner` int(10) unsigned NOT NULL DEFAULT '0', `genitive` varchar(12) NOT NULL DEFAULT '', `dative` varchar(12) NOT NULL DEFAULT '', `accusative` varchar(12) NOT NULL DEFAULT '', @@ -760,19 +760,19 @@ DROP TABLE IF EXISTS `character_queststatus`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_queststatus` ( - `guid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', - `quest` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier', - `status` tinyint(1) unsigned NOT NULL DEFAULT '0', - `explored` tinyint(1) unsigned NOT NULL DEFAULT '0', - `timer` bigint(20) unsigned NOT NULL DEFAULT '0', - `mobcount1` smallint(3) unsigned NOT NULL DEFAULT '0', - `mobcount2` smallint(3) unsigned NOT NULL DEFAULT '0', - `mobcount3` smallint(3) unsigned NOT NULL DEFAULT '0', - `mobcount4` smallint(3) unsigned NOT NULL DEFAULT '0', - `itemcount1` smallint(3) unsigned NOT NULL DEFAULT '0', - `itemcount2` smallint(3) unsigned NOT NULL DEFAULT '0', - `itemcount3` smallint(3) unsigned NOT NULL DEFAULT '0', - `itemcount4` smallint(3) unsigned NOT NULL DEFAULT '0', + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', + `quest` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier', + `status` tinyint(3) unsigned NOT NULL DEFAULT '0', + `explored` tinyint(3) unsigned NOT NULL DEFAULT '0', + `timer` int(10) unsigned NOT NULL DEFAULT '0', + `mobcount1` smallint(5) unsigned NOT NULL DEFAULT '0', + `mobcount2` smallint(5) unsigned NOT NULL DEFAULT '0', + `mobcount3` smallint(5) unsigned NOT NULL DEFAULT '0', + `mobcount4` smallint(5) unsigned NOT NULL DEFAULT '0', + `itemcount1` smallint(5) unsigned NOT NULL DEFAULT '0', + `itemcount2` smallint(5) unsigned NOT NULL DEFAULT '0', + `itemcount3` smallint(5) unsigned NOT NULL DEFAULT '0', + `itemcount4` smallint(5) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`guid`,`quest`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -794,9 +794,9 @@ DROP TABLE IF EXISTS `character_queststatus_daily`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_queststatus_daily` ( - `guid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', - `quest` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier', - `time` bigint(20) unsigned NOT NULL DEFAULT '0', + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', + `quest` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier', + `time` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`guid`,`quest`), KEY `idx_guid` (`guid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; @@ -842,8 +842,8 @@ DROP TABLE IF EXISTS `character_queststatus_weekly`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_queststatus_weekly` ( - `guid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', - `quest` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier', + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', + `quest` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier', PRIMARY KEY (`guid`,`quest`), KEY `idx_guid` (`guid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; @@ -866,10 +866,10 @@ DROP TABLE IF EXISTS `character_reputation`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_reputation` ( - `guid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', - `faction` int(11) unsigned NOT NULL DEFAULT '0', + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', + `faction` smallint(5) unsigned NOT NULL DEFAULT '0', `standing` int(11) NOT NULL DEFAULT '0', - `flags` int(11) NOT NULL DEFAULT '0', + `flags` smallint(5) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`guid`,`faction`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -891,10 +891,10 @@ DROP TABLE IF EXISTS `character_skills`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_skills` ( - `guid` int(11) unsigned NOT NULL COMMENT 'Global Unique Identifier', - `skill` mediumint(9) unsigned NOT NULL, - `value` mediumint(9) unsigned NOT NULL, - `max` mediumint(9) unsigned NOT NULL, + `guid` int(10) unsigned NOT NULL COMMENT 'Global Unique Identifier', + `skill` smallint(5) unsigned NOT NULL, + `value` smallint(5) unsigned NOT NULL, + `max` smallint(5) unsigned NOT NULL, PRIMARY KEY (`guid`,`skill`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2198,4 +2198,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2011-01-19 16:00:01 +-- Dump completed on 2011-01-19 20:29:23 diff --git a/sql/updates/2011_01_19_0_characters_character_homebind.sql b/sql/updates/2011_01_19_0_characters_character_homebind.sql new file mode 100644 index 00000000000..49c450011fc --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_homebind.sql @@ -0,0 +1,5 @@ +ALTER TABLE `character_homebind` +ROW_FORMAT=DEFAULT, +CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Global Unique Identifier', +CHANGE `map` `map` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Map Identifier', +CHANGE `zone` `zone` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Zone Identifier';
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_character_instance.sql b/sql/updates/2011_01_19_0_characters_character_instance.sql new file mode 100644 index 00000000000..aba0047f7e1 --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_instance.sql @@ -0,0 +1,4 @@ +ALTER TABLE `character_instance` +CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `instance` `instance` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `permanent` `permanent` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL;
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_character_inventory.sql b/sql/updates/2011_01_19_0_characters_character_inventory.sql new file mode 100644 index 00000000000..aca08d1ec38 --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_inventory.sql @@ -0,0 +1,5 @@ +ALTER TABLE `character_inventory` +ROW_FORMAT=DEFAULT, +CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Global Unique Identifier', +CHANGE `bag` `bag` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `item` `item` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Item Global Unique Identifier';
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_character_pet.sql b/sql/updates/2011_01_19_0_characters_character_pet.sql new file mode 100644 index 00000000000..51a4c7e0260 --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_pet.sql @@ -0,0 +1,20 @@ +ALTER TABLE `character_pet` +ROW_FORMAT=DEFAULT, +CHANGE `id` `id` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `entry` `entry` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `owner` `owner` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `modelid` `modelid` INT(10) UNSIGNED DEFAULT '0' NULL , +CHANGE `CreatedBySpell` `CreatedBySpell` MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `level` `level` SMALLINT(5) UNSIGNED DEFAULT '1' NOT NULL, +CHANGE `exp` `exp` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `Reactstate` `Reactstate` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `name` `name` VARCHAR(21) DEFAULT 'Pet' NOT NULL, +CHANGE `renamed` `renamed` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `slot` `slot` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `curhealth` `curhealth` INT(10) UNSIGNED DEFAULT '1' NOT NULL, +CHANGE `curmana` `curmana` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `curhappiness` `curhappiness` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `savetime` `savetime` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `resettalents_cost` `resettalents_cost` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `resettalents_time` `resettalents_time` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `abdata` `abdata` TEXT NULL;
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_character_pet_declinedname.sql b/sql/updates/2011_01_19_0_characters_character_pet_declinedname.sql new file mode 100644 index 00000000000..f0adc06c763 --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_pet_declinedname.sql @@ -0,0 +1,4 @@ +ALTER TABLE `character_pet_declinedname` +ROW_FORMAT=DEFAULT, +CHANGE `id` `id` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `owner` `owner` INT(10) UNSIGNED DEFAULT '0' NOT NULL;
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_character_queststatus.sql b/sql/updates/2011_01_19_0_characters_character_queststatus.sql new file mode 100644 index 00000000000..4bc7eddd39a --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_queststatus.sql @@ -0,0 +1,15 @@ +ALTER TABLE `character_queststatus` +ROW_FORMAT=DEFAULT, +CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Global Unique Identifier', +CHANGE `quest` `quest` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Quest Identifier', +CHANGE `status` `status` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `explored` `explored` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `timer` `timer` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `mobcount1` `mobcount1` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `mobcount2` `mobcount2` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `mobcount3` `mobcount3` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `mobcount4` `mobcount4` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `itemcount1` `itemcount1` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `itemcount2` `itemcount2` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `itemcount3` `itemcount3` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `itemcount4` `itemcount4` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL;
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_character_queststatus_daily.sql b/sql/updates/2011_01_19_0_characters_character_queststatus_daily.sql new file mode 100644 index 00000000000..334123e8df6 --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_queststatus_daily.sql @@ -0,0 +1,5 @@ +ALTER TABLE `character_queststatus_daily` +ROW_FORMAT=DEFAULT, +CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Global Unique Identifier', +CHANGE `quest` `quest` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Quest Identifier', +CHANGE `time` `time` INT(10) UNSIGNED DEFAULT '0' NOT NULL;
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_character_queststatus_weekly.sql b/sql/updates/2011_01_19_0_characters_character_queststatus_weekly.sql new file mode 100644 index 00000000000..fcf54ce0c14 --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_queststatus_weekly.sql @@ -0,0 +1,4 @@ +ALTER TABLE `character_queststatus_weekly` +ROW_FORMAT=DEFAULT, +CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Global Unique Identifier', +CHANGE `quest` `quest` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Quest Identifier';
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_character_reputation.sql b/sql/updates/2011_01_19_0_characters_character_reputation.sql new file mode 100644 index 00000000000..04acd20bd6c --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_reputation.sql @@ -0,0 +1,5 @@ +ALTER TABLE `character_reputation` +ROW_FORMAT=DEFAULT, +CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Global Unique Identifier', +CHANGE `faction` `faction` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `flags` `flags` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL;
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_character_skills.sql b/sql/updates/2011_01_19_0_characters_character_skills.sql new file mode 100644 index 00000000000..99bd2e754aa --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_skills.sql @@ -0,0 +1,6 @@ +ALTER TABLE `character_skills` +ROW_FORMAT=DEFAULT, +CHANGE `guid` `guid` INT(10) UNSIGNED NOT NULL COMMENT 'Global Unique Identifier', +CHANGE `skill` `skill` SMALLINT(5) UNSIGNED NOT NULL, +CHANGE `value` `value` SMALLINT(5) UNSIGNED NOT NULL, +CHANGE `max` `max` SMALLINT(5) UNSIGNED NOT NULL;
\ No newline at end of file diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index ee7988f1e8c..1fed8912e2f 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -198,7 +198,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c SetDisplayId(fields[3].GetUInt32()); SetNativeDisplayId(fields[3].GetUInt32()); - uint32 petlevel = fields[4].GetUInt32(); + uint32 petlevel = fields[4].GetUInt16(); SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); SetName(fields[8].GetString()); @@ -258,7 +258,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c // 0=current // 1..MAX_PET_STABLES in stable slot // PET_SAVE_NOT_IN_SLOT(100) = not stable slot (summoning)) - if (fields[7].GetUInt32() != 0) + if (fields[7].GetUInt8() != 0) { SQLTransaction trans = CharacterDatabase.BeginTransaction(); trans->PAppend("UPDATE character_pet SET slot = '%u' WHERE owner = '%u' AND slot = '%u' AND id <> '%u'", @@ -287,7 +287,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c map->Add(this->ToCreature()); m_resetTalentsCost = fields[15].GetUInt32(); - m_resetTalentsTime = fields[16].GetUInt64(); + m_resetTalentsTime = time_t(fields[16].GetUInt32()); InitTalentForLevel(); // set original talents points before spell loading uint32 timediff = uint32(time(NULL) - fields[14].GetUInt32()); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 89b81282e36..135175ca26a 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -1680,7 +1680,7 @@ bool Player::BuildEnumData(QueryResult result, WorldPacket * p_data) if (cInfo) { petDisplayId = fields[17].GetUInt32(); - petLevel = fields[18].GetUInt32(); + petLevel = fields[18].GetUInt16(); petFamily = cInfo->family; } } @@ -17313,8 +17313,10 @@ void Player::_LoadQuestStatus(PreparedQueryResult result) { uint16 slot = 0; - //// 0 1 3 4 5 6 7 8 9 10 11 12 - //QueryResult *result = CharacterDatabase.PQuery("SELECT quest, status, explored, timer, mobcount1, mobcount2, mobcount3, mobcount4, itemcount1, itemcount2, itemcount3, itemcount4 FROM character_queststatus WHERE guid = '%u'", GetGUIDLow()); + //// 0 1 2 3 4 5 6 7 8 9 10 + //QueryResult *result = CharacterDatabase.PQuery("SELECT quest, status, explored, timer, mobcount1, mobcount2, mobcount3, mobcount4, itemcount1, itemcount2, itemcount3, + // 11 + // itemcount4 FROM character_queststatus WHERE guid = '%u'", GetGUIDLow()); if (result) { @@ -17341,7 +17343,7 @@ void Player::_LoadQuestStatus(PreparedQueryResult result) questStatusData.m_explored = (fields[2].GetUInt8() > 0); - time_t quest_time = time_t(fields[3].GetUInt64()); + time_t quest_time = time_t(fields[3].GetUInt32()); if (pQuest->HasFlag(QUEST_TRINITY_FLAGS_TIMED) && !GetQuestRewardStatus(quest_id)) { @@ -17448,7 +17450,7 @@ void Player::_LoadDailyQuestStatus(PreparedQueryResult result) if (qQuest->IsDFQuest()) { m_DFQuests.insert(qQuest->GetQuestId()); - m_lastDailyQuestTime = (time_t)fields[1].GetUInt64(); + m_lastDailyQuestTime = time_t(fields[1].GetUInt32()); continue; } } @@ -17900,7 +17902,7 @@ bool Player::_LoadHomeBind(PreparedQueryResult result) { Field* fields = result->Fetch(); - m_homebindMapId = fields[0].GetUInt32(); + m_homebindMapId = fields[0].GetUInt16(); m_homebindAreaId = fields[1].GetUInt16(); m_homebindX = fields[2].GetFloat(); m_homebindY = fields[3].GetFloat(); diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index 19f730ba4a0..64daab36082 100755 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -484,7 +484,7 @@ void ReputationMgr::LoadFromDB(PreparedQueryResult result) { Field* fields = result->Fetch(); - FactionEntry const *factionEntry = sFactionStore.LookupEntry(fields[0].GetUInt32()); + FactionEntry const *factionEntry = sFactionStore.LookupEntry(fields[0].GetUInt16()); if (factionEntry && (factionEntry->reputationListID >= 0)) { FactionState* faction = &m_factions[factionEntry->reputationListID]; @@ -498,7 +498,7 @@ void ReputationMgr::LoadFromDB(PreparedQueryResult result) ReputationRank new_rank = ReputationToRank(BaseRep + faction->Standing); UpdateRankCounters(old_rank, new_rank); - uint32 dbFactionFlags = fields[2].GetUInt32(); + uint32 dbFactionFlags = fields[2].GetUInt16(); if (dbFactionFlags & FACTION_FLAG_VISIBLE) SetVisible(faction); // have internal checks for forced invisibility diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp index 133ff07489c..73406262b2d 100755 --- a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp @@ -562,7 +562,7 @@ void WorldSession::SendStablePetCallback(QueryResult result, uint64 guid) data << uint32(fields[1].GetUInt32()); // petnumber data << uint32(fields[2].GetUInt32()); // creature entry - data << uint32(fields[3].GetUInt32()); // level + data << uint32(fields[3].GetUInt16()); // level data << fields[4].GetString(); // name data << uint8(2); // 1 = current, 2/3 = in stable (any from 4,5,... create problems with proper show) @@ -816,7 +816,7 @@ void WorldSession::HandleStableSwapPetCallback(QueryResult result, uint32 petnum Field *fields = result->Fetch(); - uint32 slot = fields[0].GetUInt32(); + uint32 slot = fields[0].GetUInt8(); uint32 creature_id = fields[1].GetUInt32(); if (!creature_id) diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 0f99fc38f48..5a4e83992a5 100755 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -2600,7 +2600,7 @@ void World::InitDailyQuestResetTime() if (result) { Field *fields = result->Fetch(); - mostRecentQuestTime = (time_t)fields[0].GetUInt64(); + mostRecentQuestTime = time_t(fields[0].GetUInt32()); } else mostRecentQuestTime = 0; |