Merge branch 'master' of github.com:TrinityCore/TrinityCore
This commit is contained in:
@@ -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');
|
||||
@@ -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;
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user