diff options
-rw-r--r-- | sql/updates/auth/2013_02_04_00_auth_misc.sql | 3 | ||||
-rw-r--r-- | sql/updates/auth/2013_02_05_00_auth_account.sql | 2 | ||||
-rw-r--r-- | sql/updates/world/2013_02_05_00_world_disables.sql | 3 | ||||
-rw-r--r-- | sql/updates/world/2013_02_05_01_world_item_template.sql | 4 | ||||
-rw-r--r-- | sql/updates/world/2013_02_06_00_world_disables.sql | 1 | ||||
-rw-r--r-- | sql/updates/world/2013_02_06_01_world_misc.sql | 8 | ||||
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 4 | ||||
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 2 | ||||
-rw-r--r-- | src/server/shared/Database/Implementation/CharacterDatabase.cpp | 1 | ||||
-rwxr-xr-x | src/server/shared/Database/Implementation/CharacterDatabase.h | 1 | ||||
-rw-r--r-- | src/server/worldserver/RemoteAccess/RASocket.cpp | 20 | ||||
-rw-r--r-- | src/server/worldserver/TCSoap/TCSoap.cpp | 12 |
12 files changed, 41 insertions, 20 deletions
diff --git a/sql/updates/auth/2013_02_04_00_auth_misc.sql b/sql/updates/auth/2013_02_04_00_auth_misc.sql index 815df637be0..d8a508e4e7b 100644 --- a/sql/updates/auth/2013_02_04_00_auth_misc.sql +++ b/sql/updates/auth/2013_02_04_00_auth_misc.sql @@ -1,3 +1,6 @@ +-- Explicitly set the account-table to use INNODB-engine (to allow foreign keys and transactions) +ALTER TABLE account ENGINE=InnoDB; + -- Delete bad data from the DB before adding foreign keys DELETE FROM `account_access` WHERE `id` NOT IN (SELECT `id` FROM `account`); diff --git a/sql/updates/auth/2013_02_05_00_auth_account.sql b/sql/updates/auth/2013_02_05_00_auth_account.sql new file mode 100644 index 00000000000..2f32c5e3e3e --- /dev/null +++ b/sql/updates/auth/2013_02_05_00_auth_account.sql @@ -0,0 +1,2 @@ +-- Explicitly set the account-table to use INNODB-engine (to allow foreign keys and transactions) +ALTER TABLE account ENGINE=InnoDB; diff --git a/sql/updates/world/2013_02_05_00_world_disables.sql b/sql/updates/world/2013_02_05_00_world_disables.sql new file mode 100644 index 00000000000..b7e9be4e3c7 --- /dev/null +++ b/sql/updates/world/2013_02_05_00_world_disables.sql @@ -0,0 +1,3 @@ +DELETE FROM `disables` WHERE `sourceType`=0 AND `entry`=16378; +INSERT INTO `disables`(`sourceType`,`entry`,`flags`) VALUE +(0,16378,64); diff --git a/sql/updates/world/2013_02_05_01_world_item_template.sql b/sql/updates/world/2013_02_05_01_world_item_template.sql new file mode 100644 index 00000000000..aea09e60e58 --- /dev/null +++ b/sql/updates/world/2013_02_05_01_world_item_template.sql @@ -0,0 +1,4 @@ +DELETE FROM `item_template` WHERE `entry` IN (54516, 54537); +INSERT INTO `item_template` (`entry`, `class`, `subclass`, `SoundOverrideSubclass`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`, `flagsCustom`, `WDBVerified`) VALUES +(54516, 15, 0, -1, 'Loot-Filled Pumpkin', 67153, 3, 4, 8192, 1, 0, 0, 0, -1, -1, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 1, '', 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 324, '', 0, 0, 0, 0, 0, 15595), +(54537, 15, 0, -1, 'Heart-Shaped Box', 40293, 3, 4, 8192, 1, 0, 0, 0, -1, -1, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 1, '', 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 423, '', 0, 0, 0, 0, 0, 15595); diff --git a/sql/updates/world/2013_02_06_00_world_disables.sql b/sql/updates/world/2013_02_06_00_world_disables.sql new file mode 100644 index 00000000000..0785330d7fd --- /dev/null +++ b/sql/updates/world/2013_02_06_00_world_disables.sql @@ -0,0 +1 @@ +UPDATE `disables` SET `comment`='Ignore LOS for Krakles Thermometer' WHERE `sourceType`=0 AND `entry`=16378; diff --git a/sql/updates/world/2013_02_06_01_world_misc.sql b/sql/updates/world/2013_02_06_01_world_misc.sql new file mode 100644 index 00000000000..1a59c75ff1b --- /dev/null +++ b/sql/updates/world/2013_02_06_01_world_misc.sql @@ -0,0 +1,8 @@ +DELETE FROM `areatrigger_involvedrelation` WHERE `id` IN (5710,5711,5712,5714,5715,5716); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=5710 AND `source_type`=2; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(5710,2,0,1,46,0,100,0,5710,0,0,0,86,71713,0,10,208836,38340,0,7,0,0,0,0,0,0,0,"On Trigger - Crosscast - Invoker"), +(5710,2,1,0,61,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,208836,38340,0,0,0,0,0,"Link - Kill - Bunny"); + +UPDATE `quest_template` SET `SpecialFlags`=0 WHERE `Id` IN (24849,24851); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index a3a7b364844..c70cb648337 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -4895,7 +4895,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC stmt->setUInt32(0, guid); trans->Append(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_INSTANCE); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_INSTANCE_BY_OWNER); stmt->setUInt32(0, guid); trans->Append(stmt); @@ -7735,7 +7735,7 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea) } // group update - if (Group* group = GetGroup()) + if (GetGroup()) SetGroupUpdateFlag(GROUP_UPDATE_FULL); m_zoneUpdateId = newZone; diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 88d23179712..ba570ad73a4 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -6534,7 +6534,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const break; } - if (IsTriggered() || m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS) + if (IsTriggered() || m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS || DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, m_spellInfo->Id, NULL, SPELL_DISABLE_LOS)) return true; // todo: shit below shouldn't be here, but it's temporary diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp index 4fda668d341..111ab111b02 100644 --- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp @@ -147,6 +147,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_UPD_ITEM_INSTANCE, "UPDATE item_instance SET itemEntry = ?, owner_guid = ?, creatorGuid = ?, giftCreatorGuid = ?, count = ?, duration = ?, charges = ?, flags = ?, enchantments = ?, randomPropertyId = ?, durability = ?, playedTime = ?, text = ? WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_ITEM_INSTANCE_ON_LOAD, "UPDATE item_instance SET duration = ?, flags = ?, durability = ? WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_ITEM_INSTANCE, "DELETE FROM item_instance WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_DEL_ITEM_INSTANCE_BY_OWNER, "DELETE FROM item_instance WHERE owner_guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_GIFT_OWNER, "UPDATE character_gifts SET guid = ? WHERE item_guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_GIFT, "DELETE FROM character_gifts WHERE item_guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_GIFT_BY_ITEM, "SELECT entry, flags FROM character_gifts WHERE item_guid = ?", CONNECTION_SYNCH); diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h index 98e9f6f93ad..67f794a9c01 100755 --- a/src/server/shared/Database/Implementation/CharacterDatabase.h +++ b/src/server/shared/Database/Implementation/CharacterDatabase.h @@ -145,6 +145,7 @@ enum CharacterDatabaseStatements CHAR_UPD_ITEM_INSTANCE, CHAR_UPD_ITEM_INSTANCE_ON_LOAD, CHAR_DEL_ITEM_INSTANCE, + CHAR_DEL_ITEM_INSTANCE_BY_OWNER, CHAR_UPD_GIFT_OWNER, CHAR_DEL_GIFT, CHAR_SEL_CHARACTER_GIFT_BY_ITEM, diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp index 94950703271..b939f267233 100644 --- a/src/server/worldserver/RemoteAccess/RASocket.cpp +++ b/src/server/worldserver/RemoteAccess/RASocket.cpp @@ -49,14 +49,14 @@ int RASocket::open(void *) return -1; } - sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "Incoming connection from %s", remote_addr.get_host_addr()); + sLog->outInfo(LOG_FILTER_REMOTECOMMAND, "Incoming connection from %s", remote_addr.get_host_addr()); return activate(); } int RASocket::handle_close(ACE_HANDLE, ACE_Reactor_Mask) { - sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "Closing connection"); + sLog->outInfo(LOG_FILTER_REMOTECOMMAND, "Closing connection"); peer().close_reader(); wait(); destroy(); @@ -142,7 +142,7 @@ int RASocket::process_command(const std::string& command) if (command.length() == 0) return 0; - sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "Got command: %s", command.c_str()); + sLog->outInfo(LOG_FILTER_REMOTECOMMAND, "Received command: %s", command.c_str()); // handle quit, exit and logout commands to terminate connection if (command == "quit" || command == "exit" || command == "logout") { @@ -184,15 +184,13 @@ int RASocket::check_access_level(const std::string& user) AccountMgr::normalizeString(safeUser); - - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_ACCESS); stmt->setString(0, safeUser); PreparedQueryResult result = LoginDatabase.Query(stmt); if (!result) { - sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "User %s does not exist in database", user.c_str()); + sLog->outInfo(LOG_FILTER_REMOTECOMMAND, "User %s does not exist in database", user.c_str()); return -1; } @@ -200,12 +198,12 @@ int RASocket::check_access_level(const std::string& user) if (fields[1].GetUInt8() < _minLevel) { - sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "User %s has no privilege to login", user.c_str()); + sLog->outInfo(LOG_FILTER_REMOTECOMMAND, "User %s has no privilege to login", user.c_str()); return -1; } else if (fields[2].GetInt32() != -1) { - sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "User %s has to be assigned on all realms (with RealmID = '-1')", user.c_str()); + sLog->outInfo(LOG_FILTER_REMOTECOMMAND, "User %s has to be assigned on all realms (with RealmID = '-1')", user.c_str()); return -1; } @@ -231,7 +229,7 @@ int RASocket::check_password(const std::string& user, const std::string& pass) if (!result) { - sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "Wrong password for user: %s", user.c_str()); + sLog->outInfo(LOG_FILTER_REMOTECOMMAND, "Wrong password for user: %s", user.c_str()); return -1; } @@ -254,7 +252,7 @@ int RASocket::authenticate() if (recv_line(pass) == -1) return -1; - sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "Login attempt for user: %s", user.c_str()); + sLog->outInfo(LOG_FILTER_REMOTECOMMAND, "Login attempt for user: %s", user.c_str()); if (check_access_level(user) == -1) return -1; @@ -262,7 +260,7 @@ int RASocket::authenticate() if (check_password(user, pass) == -1) return -1; - sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "User login: %s", user.c_str()); + sLog->outInfo(LOG_FILTER_REMOTECOMMAND, "User login: %s", user.c_str()); return 0; } diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp index 5d578a19124..7d460da4f83 100644 --- a/src/server/worldserver/TCSoap/TCSoap.cpp +++ b/src/server/worldserver/TCSoap/TCSoap.cpp @@ -78,33 +78,33 @@ int ns1__executeCommand(soap* soap, char* command, char** result) // security check if (!soap->userid || !soap->passwd) { - sLog->outDebug(LOG_FILTER_SOAP, "Client didn't provide login information"); + sLog->outInfo(LOG_FILTER_SOAP, "Client didn't provide login information"); return 401; } uint32 accountId = AccountMgr::GetId(soap->userid); if (!accountId) { - sLog->outDebug(LOG_FILTER_SOAP, "Client used invalid username '%s'", soap->userid); + sLog->outInfo(LOG_FILTER_SOAP, "Client used invalid username '%s'", soap->userid); return 401; } if (!AccountMgr::CheckPassword(accountId, soap->passwd)) { - sLog->outDebug(LOG_FILTER_SOAP, "Invalid password for account '%s'", soap->userid); + sLog->outInfo(LOG_FILTER_SOAP, "Invalid password for account '%s'", soap->userid); return 401; } if (AccountMgr::GetSecurity(accountId) < SEC_ADMINISTRATOR) { - sLog->outDebug(LOG_FILTER_SOAP, "%s's gmlevel is too low", soap->userid); + sLog->outInfo(LOG_FILTER_SOAP, "%s's gmlevel is too low", soap->userid); return 403; } if (!command || !*command) - return soap_sender_fault(soap, "Command mustn't be empty", "The supplied command was an empty string"); + return soap_sender_fault(soap, "Command can not be empty", "The supplied command was an empty string"); - sLog->outDebug(LOG_FILTER_SOAP, "Got command '%s'", command); + sLog->outInfo(LOG_FILTER_SOAP, "Received command '%s'", command); SOAPCommand connection; // commands are executed in the world thread. We have to wait for them to be completed |