diff options
-rw-r--r-- | sql/updates/world/2012_10_06_04_world_misc_spawns.sql | 3 | ||||
-rw-r--r-- | sql/updates/world/2012_10_07_00_world_creature_loot_template.sql | 2 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 5 | ||||
-rwxr-xr-x | src/server/game/Entities/GameObject/GameObject.cpp | 1 | ||||
-rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 36 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 2 | ||||
-rwxr-xr-x | src/server/shared/Utilities/Util.cpp | 3 |
7 files changed, 32 insertions, 20 deletions
diff --git a/sql/updates/world/2012_10_06_04_world_misc_spawns.sql b/sql/updates/world/2012_10_06_04_world_misc_spawns.sql index 30d71b6db88..e53302d2c2f 100644 --- a/sql/updates/world/2012_10_06_04_world_misc_spawns.sql +++ b/sql/updates/world/2012_10_06_04_world_misc_spawns.sql @@ -1,4 +1,5 @@ SET @GUID = 42639; -- Requires one (creature) +SET @GUID2 = 42651; SET @OGUID = 5286; -- Requires three (gameobject) DELETE FROM `gameobject` WHERE `id`=203624; @@ -8,7 +9,7 @@ INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x` DELETE FROM `creature` WHERE `id` IN (40081,40091); -- ,40151); INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES (@GUID,40091,724,1,0x20,0,0,3113.711,533.5382,72.96869,1.936719,300,0,0,1,0,0,0,0,0), -(@GUID+1,40081,724,1,0x20,0,0,3153.75,533.1875,72.97205,0,300,0,0,1,0,0,0,0,0); +(@GUID2,40081,724,1,0x20,0,0,3153.75,533.1875,72.97205,0,300,0,0,1,0,0,0,0,0); SET @PATH = @GUID * 10; UPDATE `creature` SET `spawndist`=0,`MovementType`=2 WHERE `guid`=@GUID; diff --git a/sql/updates/world/2012_10_07_00_world_creature_loot_template.sql b/sql/updates/world/2012_10_07_00_world_creature_loot_template.sql new file mode 100644 index 00000000000..2829725c76c --- /dev/null +++ b/sql/updates/world/2012_10_07_00_world_creature_loot_template.sql @@ -0,0 +1,2 @@ +-- increase droprate for Plump Buzzard Wing +UPDATE `creature_loot_template` SET `chanceOrQuestChance`=-50 WHERE `item`=23239; diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index f37ae4fa60e..49023b2d5b5 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -2821,9 +2821,10 @@ void SmartScript::InitTimer(SmartScriptHolder& e) case SMART_EVENT_UPDATE: case SMART_EVENT_UPDATE_IC: case SMART_EVENT_UPDATE_OOC: - case SMART_EVENT_OOC_LOS: - case SMART_EVENT_IC_LOS: RecalcTimer(e, e.event.minMaxRepeat.min, e.event.minMaxRepeat.max); + case SMART_EVENT_IC_LOS: + case SMART_EVENT_OOC_LOS: + RecalcTimer(e, e.event.los.cooldownMin, e.event.los.cooldownMax); break; default: e.active = true; diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index da6e4ef8407..c9874932e3e 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -217,7 +217,6 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa SetDisplayId(goinfo->displayId); - m_model = GameObjectModel::Create(*this); // GAMEOBJECT_BYTES_1, index at 0, 1, 2 and 3 SetGoType(GameobjectTypes(goinfo->type)); SetGoState(go_state); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 54559507cf4..76b9649f002 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -2302,6 +2302,9 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spell) // Ranged attacks can only miss, resist and deflect if (attType == RANGED_ATTACK) { + canParry = false; + canDodge = false; + // only if in front if (victim->HasInArc(M_PI, this) || victim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION)) { @@ -6637,7 +6640,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere return false; triggered_spell_id = 0; Unit* beaconTarget = NULL; - if (this->GetTypeId() != TYPEID_PLAYER) + if (GetTypeId() != TYPEID_PLAYER) { beaconTarget = triggeredByAura->GetBase()->GetCaster(); if (beaconTarget == this || !(beaconTarget->GetAura(53563, victim->GetGUID()))) @@ -6647,23 +6650,24 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere } else { // Check Party/Raid Group - if (Group *group = this->ToPlayer()->GetGroup()) + if (Group* group = ToPlayer()->GetGroup()) { - for (GroupReference *itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { - Player* Member = itr->getSource(); - - // check if it was heal by paladin which casted this beacon of light - if (Member->GetAura(53563, victim->GetGUID())) + if (Player* member = itr->getSource()) { - // do not proc when target of beacon of light is healed - if (Member == this) - return false; + // check if it was heal by paladin which casted this beacon of light + if (member->GetAura(53563, victim->GetGUID())) + { + // do not proc when target of beacon of light is healed + if (member == this) + return false; - beaconTarget = Member; - basepoints0 = int32(damage); - triggered_spell_id = procSpell->IsRankOf(sSpellMgr->GetSpellInfo(635)) ? 53652 : 53654; - break; + beaconTarget = member; + basepoints0 = int32(damage); + triggered_spell_id = procSpell->IsRankOf(sSpellMgr->GetSpellInfo(635)) ? 53652 : 53654; + break; + } } } } @@ -6674,8 +6678,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere victim->CastCustomSpell(beaconTarget, triggered_spell_id, &basepoints0, NULL, NULL, true, 0, triggeredByAura); return true; } - else - return false; + + return false; } // Judgements of the Wise if (dummySpell->SpellIconID == 3017) diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 9c922f2c6fb..9d0e084cfb8 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -32,6 +32,7 @@ enum HunterSpells { HUNTER_SPELL_READINESS = 23989, + DRAENEI_SPELL_GIFT_OF_THE_NAARU = 59543, HUNTER_SPELL_BESTIAL_WRATH = 19574, HUNTER_PET_SPELL_LAST_STAND_TRIGGERED = 53479, HUNTER_PET_HEART_OF_THE_PHOENIX = 55709, @@ -340,6 +341,7 @@ class spell_hun_readiness : public SpellScriptLoader spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && spellInfo->Id != HUNTER_SPELL_READINESS && spellInfo->Id != HUNTER_SPELL_BESTIAL_WRATH && + spellInfo->Id != DRAENEI_SPELL_GIFT_OF_THE_NAARU && spellInfo->GetRecoveryTime() > 0) caster->RemoveSpellCooldown((itr++)->first, true); else diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp index 9778e86d444..0897c8814ab 100755 --- a/src/server/shared/Utilities/Util.cpp +++ b/src/server/shared/Utilities/Util.cpp @@ -28,16 +28,19 @@ static SFMTRandTSS sfmtRand; int32 irand(int32 min, int32 max) { + assert(max >= min); return int32(sfmtRand->IRandom(min, max)); } uint32 urand(uint32 min, uint32 max) { + assert(max >= min); return sfmtRand->URandom(min, max); } float frand(float min, float max) { + assert(max >= min); return float(sfmtRand->Random() * (max - min) + min); } |