diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/AI/EventAI/CreatureEventAIMgr.cpp | 2 | ||||
-rwxr-xr-x | src/server/game/Accounts/AccountMgr.cpp | 2 | ||||
-rwxr-xr-x | src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp | 46 | ||||
-rwxr-xr-x | src/server/game/Battlegrounds/Zones/BattlegroundRV.h | 15 | ||||
-rwxr-xr-x | src/server/game/Entities/Player/Player.cpp | 18 | ||||
-rwxr-xr-x | src/server/game/Events/GameEventMgr.cpp | 2 | ||||
-rwxr-xr-x | src/server/game/Globals/ObjectMgr.cpp | 2 | ||||
-rwxr-xr-x | src/server/game/Groups/Group.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Groups/GroupMgr.cpp | 6 | ||||
-rwxr-xr-x | src/server/game/Guilds/Guild.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Handlers/CharacterHandler.cpp | 79 | ||||
-rwxr-xr-x | src/server/game/Handlers/PetitionsHandler.cpp | 2 | ||||
-rwxr-xr-x | src/server/game/Reputation/ReputationMgr.cpp | 2 | ||||
-rwxr-xr-x | src/server/game/World/World.cpp | 2 | ||||
-rw-r--r-- | src/server/shared/Database/Implementation/CharacterDatabase.cpp | 2 | ||||
-rwxr-xr-x | src/server/shared/Packets/ByteBuffer.h | 2 |
16 files changed, 92 insertions, 94 deletions
diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp index facfbd7581c..517e55af457 100755 --- a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp @@ -38,7 +38,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts() // Load EventAI Text sObjectMgr->LoadTrinityStrings("creature_ai_texts", MIN_CREATURE_AI_TEXT_STRING_ID, MAX_CREATURE_AI_TEXT_STRING_ID); - // Gather Additional data from EventAI Texts + // Gather Additional data from EventAI Texts 0 1 2 3 4 QueryResult result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM creature_ai_texts"); if (!result) diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp index 240609e3821..9963ade54f9 100755 --- a/src/server/game/Accounts/AccountMgr.cpp +++ b/src/server/game/Accounts/AccountMgr.cpp @@ -235,7 +235,7 @@ uint32 GetCharactersCount(uint32 accountId) stmt->setUInt32(0, accountId); PreparedQueryResult result = CharacterDatabase.Query(stmt); - return (result) ? (*result)[0].GetUInt32() : 0; + return (result) ? (*result)[0].GetUInt64() : 0; } bool normalizeString(std::string& utf8String) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp index 98bb704661e..6869a899305 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp @@ -32,7 +32,7 @@ BattlegroundRV::BattlegroundRV() StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S; StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S; StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE; - //we must set messageIds + // we must set messageIds StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE; StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS; StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS; @@ -46,40 +46,32 @@ BattlegroundRV::~BattlegroundRV() void BattlegroundRV::PostUpdateImpl(uint32 diff) { + if (GetStatus() != STATUS_IN_PROGRESS) + return; + if (getTimer() < diff) { switch (getState()) { case BG_RV_STATE_OPEN_FENCES: - setTimer(BG_RV_PILAR_TO_FIRE_TIMER); + // Open fire (only at game start) + for (uint8 i = BG_RV_OBJECT_FIRE_1; i <= BG_RV_OBJECT_FIREDOOR_2; ++i) + DoorOpen(i); + setTimer(BG_RV_CLOSE_FIRE_TIMER); setState(BG_RV_STATE_CLOSE_FIRE); break; case BG_RV_STATE_CLOSE_FIRE: for (uint8 i = BG_RV_OBJECT_FIRE_1; i <= BG_RV_OBJECT_FIREDOOR_2; ++i) DoorClose(i); - setTimer(BG_RV_FIRE_TO_PILAR_TIMER); - setState(BG_RV_STATE_OPEN_PILARS); + // Fire got closed after five seconds, leaves twenty seconds before toggling pillars + setTimer(BG_RV_FIRE_TO_PILLAR_TIMER); + setState(BG_RV_STATE_SWITCH_PILLARS); break; - case BG_RV_STATE_OPEN_PILARS: + case BG_RV_STATE_SWITCH_PILLARS: for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PULLEY_2; ++i) DoorOpen(i); - TogglePillarCollision(false); - setTimer(BG_RV_PILAR_TO_FIRE_TIMER); - setState(BG_RV_STATE_OPEN_FIRE); - break; - case BG_RV_STATE_OPEN_FIRE: - // FIXME: after 3.2.0 it's only decorative and should be opened only one time at battle start - for (uint8 i = BG_RV_OBJECT_FIRE_1; i <= BG_RV_OBJECT_FIREDOOR_2; ++i) - DoorOpen(i); - setTimer(BG_RV_FIRE_TO_PILAR_TIMER); - setState(BG_RV_STATE_CLOSE_PILARS); - break; - case BG_RV_STATE_CLOSE_PILARS: - for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PULLEY_2; ++i) - DoorOpen(i); - TogglePillarCollision(true); - setTimer(BG_RV_PILAR_TO_FIRE_TIMER); - setState(BG_RV_STATE_CLOSE_FIRE); + TogglePillarCollision(); + setTimer(BG_RV_PILLAR_SWITCH_TIMER); break; } } @@ -103,7 +95,9 @@ void BattlegroundRV::StartingEventOpenDoors() setState(BG_RV_STATE_OPEN_FENCES); setTimer(BG_RV_FIRST_TIMER); - TogglePillarCollision(true); + // Should be false at first, TogglePillarCollision will do it. + SetPillarCollision(true); + TogglePillarCollision(); } void BattlegroundRV::AddPlayer(Player* player) @@ -227,8 +221,10 @@ bool BattlegroundRV::SetupBattleground() } -void BattlegroundRV::TogglePillarCollision(bool apply) +void BattlegroundRV::TogglePillarCollision() { + bool apply = GetPillarCollision(); + for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PILAR_COLLISION_4; ++i) { if (GameObject* gob = GetBgMap()->GetGameObject(BgObjects[i])) @@ -249,4 +245,6 @@ void BattlegroundRV::TogglePillarCollision(bool apply) gob->SendUpdateToPlayer(player); } } + + SetPillarCollision(!apply); }
\ No newline at end of file diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h index 1dfd4825c8f..8c5746931e3 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h @@ -79,12 +79,12 @@ enum BattlegroundRVObjects enum BattlegroundRVData { BG_RV_STATE_OPEN_FENCES, - BG_RV_STATE_OPEN_PILARS, - BG_RV_STATE_CLOSE_PILARS, - BG_RV_STATE_OPEN_FIRE, + BG_RV_STATE_SWITCH_PILLARS, BG_RV_STATE_CLOSE_FIRE, - BG_RV_FIRE_TO_PILAR_TIMER = 20000, - BG_RV_PILAR_TO_FIRE_TIMER = 5000, + + BG_RV_PILLAR_SWITCH_TIMER = 25000, + BG_RV_FIRE_TO_PILLAR_TIMER = 20000, + BG_RV_CLOSE_FIRE_TIMER = 5000, BG_RV_FIRST_TIMER = 20133, BG_RV_WORLD_STATE_A = 0xe10, BG_RV_WORLD_STATE_H = 0xe11, @@ -120,6 +120,7 @@ class BattlegroundRV : public Battleground private: uint32 Timer; uint32 State; + bool PillarCollision; virtual void PostUpdateImpl(uint32 diff); @@ -129,6 +130,8 @@ class BattlegroundRV : public Battleground uint32 getState() { return State; }; void setState(uint32 state) { State = state; }; - void TogglePillarCollision(bool apply); + void TogglePillarCollision(); + bool GetPillarCollision() { return PillarCollision; } + void SetPillarCollision(bool apply) { PillarCollision = apply; } }; #endif diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index fac73304506..f4a5cbb5572 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -5120,7 +5120,7 @@ void Player::DeleteOldCharacters(uint32 keepDays) do { Field* fields = result->Fetch(); - Player::DeleteFromDB(fields[0].GetUInt64(), fields[1].GetUInt32(), true, true); + Player::DeleteFromDB(fields[0].GetUInt32(), fields[1].GetUInt32(), true, true); } while (result->NextRow()); } @@ -16645,7 +16645,7 @@ void Player::_LoadEquipmentSets(PreparedQueryResult result) EquipmentSet eqSet; eqSet.Guid = fields[0].GetUInt64(); - uint32 index = fields[1].GetUInt32(); + uint8 index = fields[1].GetUInt8(); eqSet.Name = fields[2].GetString(); eqSet.IconName = fields[3].GetString(); eqSet.state = EQUIPMENT_SET_UNCHANGED; @@ -16875,7 +16875,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) uint32 transGUID = fields[30].GetUInt32(); Relocate(fields[12].GetFloat(), fields[13].GetFloat(), fields[14].GetFloat(), fields[16].GetFloat()); uint32 mapId = fields[15].GetUInt16(); - uint32 instanceId = fields[58].GetUInt8(); + uint32 instanceId = fields[58].GetUInt32(); uint32 dungeonDiff = fields[38].GetUInt8() & 0x0F; if (dungeonDiff >= MAX_DUNGEON_DIFFICULTY) @@ -17222,7 +17222,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) float bubble0 = 0.031f; //speed collect rest bonus in offline, in logout, in tavern, city (section/in hour) float bubble1 = 0.125f; - float bubble = fields[23].GetUInt32() > 0 + float bubble = fields[23].GetUInt8() > 0 ? bubble1*sWorld->getRate(RATE_REST_OFFLINE_IN_TAVERN_OR_CITY) : bubble0*sWorld->getRate(RATE_REST_OFFLINE_IN_WILDERNESS); @@ -17870,12 +17870,12 @@ void Player::_LoadMailInit(PreparedQueryResult resultUnread, PreparedQueryResult //set a count of unread mails //QueryResult* resultMails = CharacterDatabase.PQuery("SELECT COUNT(id) FROM mail WHERE receiver = '%u' AND (checked & 1)=0 AND deliver_time <= '" UI64FMTD "'", GUID_LOPART(playerGuid), (uint64)cTime); if (resultUnread) - unReadMails = (*resultUnread)[0].GetUInt8(); + unReadMails = uint8((*resultUnread)[0].GetUInt64()); // store nearest delivery time (it > 0 and if it < current then at next player update SendNewMaill will be called) //resultMails = CharacterDatabase.PQuery("SELECT MIN(deliver_time) FROM mail WHERE receiver = '%u' AND (checked & 1)=0", GUID_LOPART(playerGuid)); if (resultDelivery) - m_nextMailDelivereTime = (time_t)(*resultDelivery)[0].GetUInt64(); + m_nextMailDelivereTime = time_t((*resultDelivery)[0].GetUInt32()); } void Player::_LoadMail() @@ -17904,7 +17904,7 @@ void Player::_LoadMail() m->deliver_time = time_t(fields[8].GetUInt32()); m->money = fields[9].GetUInt32(); m->COD = fields[10].GetUInt32(); - m->checked = fields[11].GetUInt32(); + m->checked = fields[11].GetUInt8(); m->stationery = fields[12].GetUInt8(); m->mailTemplateId = fields[13].GetInt16(); @@ -18098,7 +18098,7 @@ void Player::_LoadDailyQuestStatus(PreparedQueryResult result) uint32 quest_id = fields[0].GetUInt32(); // save _any_ from daily quest times (it must be after last reset anyway) - m_lastDailyQuestTime = (time_t)fields[1].GetUInt64(); + m_lastDailyQuestTime = time_t(fields[1].GetUInt32()); Quest const* quest = sObjectMgr->GetQuestTemplate(quest_id); if (!quest) @@ -18303,7 +18303,7 @@ void Player::UnbindInstance(BoundInstancesMap::iterator &itr, Difficulty difficu { if (!unload) { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_INSTANCE_BY_INSTANCE); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_INSTANCE_BY_INSTANCE_GUID); stmt->setUInt32(0, GetGUIDLow()); stmt->setUInt32(1, itr->second.save->GetInstanceId()); diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index 58ced12e487..a8492726e75 100755 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -205,7 +205,7 @@ void GameEventMgr::LoadFromDB() { { uint32 oldMSTime = getMSTime(); - + // 1 2 3 4 5 6 7 8 QueryResult result = WorldDatabase.Query("SELECT eventEntry, UNIX_TIMESTAMP(start_time), UNIX_TIMESTAMP(end_time), occurence, length, holiday, description, world_event FROM game_event"); if (!result) { diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index acc30dcc2d4..bf647fa5c31 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -5317,7 +5317,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) std::map<uint32 /*messageId*/, MailItemInfoVec> itemsCache; stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_EXPIRED_MAIL_ITEMS); - stmt->setUInt64(0, basetime); + stmt->setUInt32(0, (uint32)basetime); if (PreparedQueryResult items = CharacterDatabase.Query(stmt)) { MailItemInfo item; diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 47b086553c5..768531b0aea 100755 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -171,7 +171,7 @@ void Group::LoadGroupFromDB(Field* fields) m_lootMethod = LootMethod(fields[1].GetUInt8()); m_looterGuid = MAKE_NEW_GUID(fields[2].GetUInt32(), 0, HIGHGUID_PLAYER); - m_lootThreshold = ItemQualities(fields[3].GetUInt16()); + m_lootThreshold = ItemQualities(fields[3].GetUInt8()); for (uint8 i = 0; i < TARGETICONCOUNT; ++i) m_targetIcons[i] = fields[4+i].GetUInt32(); diff --git a/src/server/game/Groups/GroupMgr.cpp b/src/server/game/Groups/GroupMgr.cpp index 3d901f42501..f372f08c941 100644 --- a/src/server/game/Groups/GroupMgr.cpp +++ b/src/server/game/Groups/GroupMgr.cpp @@ -215,10 +215,10 @@ void GroupMgr::LoadGroups() Group* group = GetGroupByDbStoreId(fields[0].GetUInt32()); // group will never be NULL (we have run consistency sql's before loading) - MapEntry const* mapEntry = sMapStore.LookupEntry(fields[1].GetUInt32()); + MapEntry const* mapEntry = sMapStore.LookupEntry(fields[1].GetUInt16()); if (!mapEntry || !mapEntry->IsDungeon()) { - sLog->outErrorDb("Incorrect entry in group_instance table : no dungeon map %d", fields[1].GetUInt32()); + sLog->outErrorDb("Incorrect entry in group_instance table : no dungeon map %d", fields[1].GetUInt16()); continue; } @@ -229,7 +229,7 @@ void GroupMgr::LoadGroups() diff = 0; // default for both difficaly types } - InstanceSave* save = sInstanceSaveMgr->AddInstanceSave(mapEntry->MapID, fields[2].GetUInt32(), Difficulty(diff), time_t(fields[5].GetUInt64()), fields[6].GetBool(), true); + InstanceSave* save = sInstanceSaveMgr->AddInstanceSave(mapEntry->MapID, fields[2].GetUInt32(), Difficulty(diff), time_t(fields[5].GetUInt32()), (bool)fields[6].GetUInt64(), true); group->BindToInstance(save, fields[3].GetBool(), true); ++count; } diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 1c7c0872a70..889174420c6 100755 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -1838,7 +1838,7 @@ bool Guild::LoadFromDB(Field* fields) m_createdDate = time_t(fields[10].GetUInt32()); m_bankMoney = fields[11].GetUInt64(); - uint8 purchasedTabs = uint8(fields[12].GetUInt32()); + uint8 purchasedTabs = uint8(fields[12].GetUInt64()); if (purchasedTabs > GUILD_BANK_MAX_TABS) purchasedTabs = GUILD_BANK_MAX_TABS; diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 0923281588c..1e54bbe6995 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -1617,8 +1617,8 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data) } Field* fields = result->Fetch(); - uint32 playerClass = fields[0].GetUInt32(); - uint32 level = fields[1].GetUInt32(); + uint32 playerClass = uint32(fields[0].GetUInt8()); + uint32 level = uint32(fields[1].GetUInt8()); uint32 at_loginFlags = fields[2].GetUInt16(); uint32 used_loginFlag = ((recv_data.GetOpcode() == CMSG_CHAR_RACE_CHANGE) ? AT_LOGIN_CHANGE_RACE : AT_LOGIN_CHANGE_FACTION); @@ -1724,7 +1724,6 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data) // Switch Languages // delete all languages first - stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SKILL_LANGUAGES); stmt->setUInt32(0, lowGuid); trans->Append(stmt); @@ -1733,52 +1732,50 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data) stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_SKILL_LANGUAGE); stmt->setUInt32(0, lowGuid); - // Faction specific languages - if (team == BG_TEAM_ALLIANCE) - { - stmt->setUInt16(1, 98); - } - else if (team == BG_TEAM_HORDE) - { + if (team == BG_TEAM_HORDE) stmt->setUInt16(1, 109); - } + else + stmt->setUInt16(1, 98); trans->Append(stmt); // Race specific languages - stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_SKILL_LANGUAGE); - stmt->setUInt32(0, lowGuid); - - switch (race) + if (race != RACE_ORC && race != RACE_HUMAN) { - case RACE_DWARF: - stmt->setUInt16(1, 111); - break; - case RACE_DRAENEI: - stmt->setUInt16(1, 759); - break; - case RACE_GNOME: - stmt->setUInt16(1, 313); - break; - case RACE_NIGHTELF: - stmt->setUInt16(1, 113); - break; - case RACE_UNDEAD_PLAYER: - stmt->setUInt16(1, 673); - break; - case RACE_TAUREN: - stmt->setUInt16(1, 115); - break; - case RACE_TROLL: - stmt->setUInt16(1, 315); - break; - case RACE_BLOODELF: - stmt->setUInt16(1, 137); - break; - } + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_SKILL_LANGUAGE); + stmt->setUInt32(0, lowGuid); - trans->Append(stmt); + switch (race) + { + case RACE_DWARF: + stmt->setUInt16(1, 111); + break; + case RACE_DRAENEI: + stmt->setUInt16(1, 759); + break; + case RACE_GNOME: + stmt->setUInt16(1, 313); + break; + case RACE_NIGHTELF: + stmt->setUInt16(1, 113); + break; + case RACE_UNDEAD_PLAYER: + stmt->setUInt16(1, 673); + break; + case RACE_TAUREN: + stmt->setUInt16(1, 115); + break; + case RACE_TROLL: + stmt->setUInt16(1, 315); + break; + case RACE_BLOODELF: + stmt->setUInt16(1, 137); + break; + } + + trans->Append(stmt); + } if (recv_data.GetOpcode() == CMSG_CHAR_FACTION_CHANGE) { diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp index 139fa04cd9c..7a3964b9469 100755 --- a/src/server/game/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Handlers/PetitionsHandler.cpp @@ -912,7 +912,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data) stmt->setUInt32(0, GUID_LOPART(petitionGuid)); trans->Append(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_PETITION_SIGNATURE); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_PETITION_SIGNATURE_BY_GUID); stmt->setUInt32(0, GUID_LOPART(petitionGuid)); trans->Append(stmt); diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index a9a02170e5f..94a6590cc4a 100755 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -521,7 +521,7 @@ void ReputationMgr::LoadFromDB(PreparedQueryResult result) FactionState* faction = &_factions[factionEntry->reputationListID]; // update standing to current - faction->Standing = int32(fields[1].GetUInt32()); + faction->Standing = fields[1].GetInt32(); // update counters int32 BaseRep = GetBaseReputation(factionEntry); diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index fd39beb49ff..1a9905edd12 100755 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -2934,7 +2934,7 @@ void World::LoadCharacterNameData() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); AddCharacterNameData(fields[0].GetUInt32(), fields[1].GetString(), fields[3].GetUInt8() /*gender*/, fields[2].GetUInt8() /*race*/, fields[4].GetUInt8() /*class*/); ++count; diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp index a9754cfc73d..9d29aa6f9a9 100644 --- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp @@ -506,7 +506,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PREPARE_STATEMENT(CHAR_DEL_CHAR_AURA, "DELETE FROM character_aura WHERE guid = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_CHAR_GIFT, "DELETE FROM character_gifts WHERE guid = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_CHAR_INSTANCE, "DELETE FROM character_instance WHERE guid = ?", CONNECTION_ASYNC); - PREPARE_STATEMENT(CHAR_DEL_CHAR_INVENTORY, "DELETE FROM character_instance WHERE guid = ?", CONNECTION_ASYNC); + PREPARE_STATEMENT(CHAR_DEL_CHAR_INVENTORY, "DELETE FROM character_inventory WHERE guid = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_CHAR_QUESTSTATUS_REWARDED, "DELETE FROM character_queststatus_rewarded WHERE guid = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_CHAR_REPUTATION, "DELETE FROM character_reputation WHERE guid = ?", CONNECTION_ASYNC); PREPARE_STATEMENT(CHAR_DEL_CHAR_SPELL, "DELETE FROM character_spell WHERE guid = ?", CONNECTION_ASYNC); diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h index 35cb62240d8..fb2fdf09583 100755 --- a/src/server/shared/Packets/ByteBuffer.h +++ b/src/server/shared/Packets/ByteBuffer.h @@ -363,7 +363,7 @@ class ByteBuffer void resize(size_t newsize) { - _storage.resize(newsize); + _storage.resize(newsize, 0); _rpos = 0; _wpos = size(); } |