diff options
8 files changed, 32 insertions, 12 deletions
diff --git a/sql/updates/world/2012_01_27_00_player_factionchange_items.sql b/sql/updates/world/2012_01_27_00_player_factionchange_items.sql new file mode 100644 index 00000000000..1dc2749807e --- /dev/null +++ b/sql/updates/world/2012_01_27_00_player_factionchange_items.sql @@ -0,0 +1,4 @@ +-- DB/Faction change: Add some missing items +DELETE FROM `player_factionchange_items` WHERE `alliance_id` IN (47711) AND horde_id IN (47870); +INSERT INTO `player_factionchange_items` (`race_A`,`alliance_id`,`commentA`,`race_H`,`horde_id`,`commentH`) VALUES +(0,47711, 'Girdle of the Nether Champion',0,47870, 'Belt of the Nether Championt'); diff --git a/sql/updates/world/2012_01_28_world_conditions.sql b/sql/updates/world/2012_01_28_world_conditions.sql new file mode 100644 index 00000000000..8d087af7e88 --- /dev/null +++ b/sql/updates/world/2012_01_28_world_conditions.sql @@ -0,0 +1,16 @@ +-- Class Condition update to use flags +UPDATE `conditions` SET `ConditionValue1`=8 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=21194 AND `ConditionTypeOrReference`=15; +UPDATE `conditions` SET `ConditionValue1`=128 WHERE `SourceTypeOrReferenceId` IN (14,15) AND`SourceGroup`=4486 AND `ConditionTypeOrReference`=15; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=20 AND `SourceEntry` IN (13104,13105) AND `ConditionTypeOrReference`=15; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(20,0,13104,1,15,1503,0,0,0,'','Show quest 13104 if player is not a Death Knight'), +(20,0,13105,1,15,32,0,0,0,'','Show quest 13105 if player is a Death Knight'); +-- Race Condition update to use flags +UPDATE `conditions` SET `ConditionValue1`=128 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24101 AND `ConditionTypeOrReference`=16; +UPDATE `conditions` SET `ConditionValue1`=32 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24102 AND `ConditionTypeOrReference`=16; +UPDATE `conditions` SET `ConditionValue1`=16 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24103 AND `ConditionTypeOrReference`=16; +UPDATE `conditions` SET `ConditionValue1`=64 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24106 AND `ConditionTypeOrReference`=16; +UPDATE `conditions` SET `ConditionValue1`=4 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24107 AND `ConditionTypeOrReference`=16; +UPDATE `conditions` SET `ConditionValue1`=8 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24108 AND `ConditionTypeOrReference`=16; +UPDATE `conditions` SET `ConditionValue1`=512 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=69530 AND `ConditionTypeOrReference`=16; +UPDATE `conditions` SET `ConditionValue1`=1024 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=69533 AND `ConditionTypeOrReference`=16;
\ No newline at end of file diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 79fe3df7ff7..d4b2a9746be 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -89,7 +89,7 @@ void SmartAI::UpdateDespawn(const uint32 diff) void SmartAI::Reset() { if (!HasEscortState(SMART_ESCORT_ESCORTING))//dont mess up escort movement after combat - SetRun(true); + SetRun(mRun); GetScript()->OnReset(); } diff --git a/src/server/game/Chat/Commands/Level2.cpp b/src/server/game/Chat/Commands/Level2.cpp index 31942d9e2fa..68961b9de61 100755 --- a/src/server/game/Chat/Commands/Level2.cpp +++ b/src/server/game/Chat/Commands/Level2.cpp @@ -332,8 +332,8 @@ bool ChatHandler::HandlePInfoCommand(const char* args) QueryResult result = LoginDatabase.PQuery("SELECT a.username, aa.gmlevel, a.email, a.last_ip, a.last_login, a.mutetime " "FROM account a " "LEFT JOIN account_access aa " - "ON (a.id = aa.id) " - "WHERE a.id = '%u'", accId); + "ON (a.id = aa.id AND (aa.RealmID = -1 OR aa.RealmID = %u)) " + "WHERE a.id = '%u'", realmID, accId); if (result) { Field* fields = result->Fetch(); diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 49b5d4cba65..dd46898a0c6 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -73,10 +73,10 @@ bool Condition::Meets(Player* player, Unit* invoker) condMeets = player->GetTeam() == mConditionValue1; break; case CONDITION_CLASS: - condMeets = player->getClass() == mConditionValue1; + condMeets = player->getClassMask() & mConditionValue1; break; case CONDITION_RACE: - condMeets = player->getRace() == mConditionValue1; + condMeets = player->getRaceMask() & mConditionValue1; break; case CONDITION_SKILL: condMeets = player->HasSkill(mConditionValue1) && player->GetBaseSkillValue(mConditionValue1) >= mConditionValue2; @@ -1180,9 +1180,9 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } case CONDITION_CLASS: { - if (cond->mConditionValue1 >= MAX_CLASSES) + if (!(cond->mConditionValue1 & CLASSMASK_ALL_PLAYABLE)) { - sLog->outErrorDb("Class condition has non existing class (%u), skipped", cond->mConditionValue1); + sLog->outErrorDb("Class condition has non existing classmask (%u), skipped", cond->mConditionValue1 & ~CLASSMASK_ALL_PLAYABLE); return false; } @@ -1192,9 +1192,9 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } case CONDITION_RACE: { - if (cond->mConditionValue1 >= MAX_RACES) + if (!(cond->mConditionValue1 & RACEMASK_ALL_PLAYABLE)) { - sLog->outErrorDb("Race condition has non existing race (%u), skipped", cond->mConditionValue1); + sLog->outErrorDb("Race condition has non existing racemask (%u), skipped", cond->mConditionValue1 & ~RACEMASK_ALL_PLAYABLE); return false; } diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp index 885ade57653..b5ae923dc32 100644 --- a/src/server/game/Movement/Spline/MoveSplineInit.cpp +++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp @@ -106,7 +106,6 @@ namespace Movement void MoveSplineInit::SetFacing(const Unit * target) { args.flags.EnableFacingTarget(); - target->GetUInt64Value(OBJECT_FIELD_GUID); //args.facing.target = target->GetObjectGuid().GetRawValue(); args.facing.target = target->GetUInt64Value(OBJECT_FIELD_GUID); } diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp index b69f800327e..9b9d1cfd146 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ObjectMgr.h" #include "Chat.h" #include "AccountMgr.h" +#include "World.h" class gm_commandscript : public CommandScript { @@ -155,7 +156,7 @@ public: static bool HandleGMListFullCommand(ChatHandler* handler, char const* /*args*/) { ///- Get the accounts with GM Level >0 - QueryResult result = LoginDatabase.PQuery("SELECT a.username, aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel >= %u", SEC_MODERATOR); + QueryResult result = LoginDatabase.PQuery("SELECT a.username, aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel >= %u AND (aa.realmid = -1 OR aa.realmid = %u)", SEC_MODERATOR, realmID); if (result) { handler->SendSysMessage(LANG_GMLIST); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp index ea54fc16095..94a133c78a6 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp @@ -302,7 +302,7 @@ class spell_frost_tomb : public SpellScriptLoader if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEATH) if (Unit* caster = GetCaster()) if (caster->ToCreature() && caster->isAlive()) - caster->ToCreature()->DespawnOrUnsummon(); + caster->ToCreature()->DespawnOrUnsummon(1000); } void Register() |