diff options
| -rw-r--r-- | sql/updates/world/2012_08_19_00_world_pickpocketing_loot_template.sql | 11 | ||||
| -rw-r--r-- | sql/updates/world/2012_08_19_01_world_spell_dbc.sql | 4 | ||||
| -rw-r--r-- | sql/updates/world/2012_08_20_00_world_spell_script_names.sql | 3 | ||||
| -rw-r--r-- | src/server/collision/Maps/TileAssembler.cpp | 8 | ||||
| -rwxr-xr-x | src/server/game/DungeonFinding/LFGMgr.cpp | 4 | ||||
| -rwxr-xr-x | src/server/game/Entities/GameObject/GameObject.cpp | 16 | ||||
| -rwxr-xr-x | src/server/game/Entities/Player/Player.h | 2 | ||||
| -rwxr-xr-x | src/server/game/Maps/Map.h | 6 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 36 | ||||
| -rw-r--r-- | src/tools/vmap4_extractor/vmapexport.cpp | 18 |
10 files changed, 84 insertions, 24 deletions
diff --git a/sql/updates/world/2012_08_19_00_world_pickpocketing_loot_template.sql b/sql/updates/world/2012_08_19_00_world_pickpocketing_loot_template.sql new file mode 100644 index 00000000000..773ad9b6ebc --- /dev/null +++ b/sql/updates/world/2012_08_19_00_world_pickpocketing_loot_template.sql @@ -0,0 +1,11 @@ +-- Pickpocketing_loot_template +UPDATE creature_template SET pickpocketloot=entry WHERE entry=28200; +DELETE FROM `pickpocketing_loot_template` WHERE entry=28200; +INSERT INTO `pickpocketing_loot_template` (`entry`,`item`,`ChanceorQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +-- Dark Necromance +(28200,37467,100,1,0,1,1),-- A Steamy Romance Novel: Forbidden Love +(28200,43575,100,1,0,1,1),-- Reinforced Junkbox +(28200,35952,30,1,0,1,1),-- Briny Hardcheese +(28200,33447,22,1,0,1,1),-- Runic Healing Potion +(28200,35948,10,1,0,1,1),-- Savory Snowplum +(28200,35950,10,1,0,1,1);-- Sweet Potato Bread diff --git a/sql/updates/world/2012_08_19_01_world_spell_dbc.sql b/sql/updates/world/2012_08_19_01_world_spell_dbc.sql new file mode 100644 index 00000000000..69a9c2a8336 --- /dev/null +++ b/sql/updates/world/2012_08_19_01_world_spell_dbc.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_dbc` WHERE `Id` IN (68184,68620); +INSERT INTO `spell_dbc` (`Id`, `Dispel`, `Mechanic`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `AttributesEx5`, `AttributesEx6`, `AttributesEx7`, `Stances`, `StancesNot`, `Targets`, `CastingTimeIndex`, `AuraInterruptFlags`, `ProcFlags`, `ProcChance`, `ProcCharges`, `MaxLevel`, `BaseLevel`, `SpellLevel`, `DurationIndex`, `RangeIndex`, `StackAmount`, `EquippedItemClass`, `EquippedItemSubClassMask`, `EquippedItemInventoryTypeMask`, `Effect1`, `Effect2`, `Effect3`, `EffectDieSides1`, `EffectDieSides2`, `EffectDieSides3`, `EffectRealPointsPerLevel1`, `EffectRealPointsPerLevel2`, `EffectRealPointsPerLevel3`, `EffectBasePoints1`, `EffectBasePoints2`, `EffectBasePoints3`, `EffectMechanic1`, `EffectMechanic2`, `EffectMechanic3`, `EffectImplicitTargetA1`, `EffectImplicitTargetA2`, `EffectImplicitTargetA3`, `EffectImplicitTargetB1`, `EffectImplicitTargetB2`, `EffectImplicitTargetB3`, `EffectRadiusIndex1`, `EffectRadiusIndex2`, `EffectRadiusIndex3`, `EffectApplyAuraName1`, `EffectApplyAuraName2`, `EffectApplyAuraName3`, `EffectAmplitude1`, `EffectAmplitude2`, `EffectAmplitude3`, `EffectMultipleValue1`, `EffectMultipleValue2`, `EffectMultipleValue3`, `EffectMiscValue1`, `EffectMiscValue2`, `EffectMiscValue3`, `EffectMiscValueB1`, `EffectMiscValueB2`, `EffectMiscValueB3`, `EffectTriggerSpell1`, `EffectTriggerSpell2`, `EffectTriggerSpell3`, `EffectSpellClassMaskA1`, `EffectSpellClassMaskA2`, `EffectSpellClassMaskA3`, `EffectSpellClassMaskB1`, `EffectSpellClassMaskB2`, `EffectSpellClassMaskB3`, `EffectSpellClassMaskC1`, `EffectSpellClassMaskC2`, `EffectSpellClassMaskC3`, `MaxTargetLevel`, `SpellFamilyName`, `SpellFamilyFlags1`, `SpellFamilyFlags2`, `SpellFamilyFlags3`, `MaxAffectedTargets`, `DmgClass`, `PreventionType`, `DmgMultiplier1`, `DmgMultiplier2`, `DmgMultiplier3`, `AreaGroupId`, `SchoolMask`, `Comment`) VALUES +(68184, 0, 0, 545259904, 0, 5, 268697856, 128, 0, 16777216, 0, 0, 0, 0, 1, 0, 0, 101, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 7, 0, 0, 28, 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, 'Faction Champions - credit marker'), +(68620, 0, 0, 545259904, 0, 5, 268697856, 128, 0, 16777216, 0, 0, 0, 0, 1, 0, 0, 101, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 7, 0, 0, 28, 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, 'Resilience Will Fix It - achievement credit marker'); diff --git a/sql/updates/world/2012_08_20_00_world_spell_script_names.sql b/sql/updates/world/2012_08_20_00_world_spell_script_names.sql new file mode 100644 index 00000000000..d0aa185ea3a --- /dev/null +++ b/sql/updates/world/2012_08_20_00_world_spell_script_names.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE (`spell_id`='33695'); +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(33695, 'spell_pal_exorcism_and_holy_wrath_damage'); diff --git a/src/server/collision/Maps/TileAssembler.cpp b/src/server/collision/Maps/TileAssembler.cpp index 3bfed7d322d..207b652a4d6 100644 --- a/src/server/collision/Maps/TileAssembler.cpp +++ b/src/server/collision/Maps/TileAssembler.cpp @@ -336,9 +336,15 @@ namespace VMAP void TileAssembler::exportGameobjectModels() { FILE* model_list = fopen((iSrcDir + "/" + "temp_gameobject_models").c_str(), "rb"); + if (!model_list) + return; + FILE* model_list_copy = fopen((iDestDir + "/" + GAMEOBJECT_MODELS).c_str(), "wb"); - if (!model_list || !model_list_copy) + if (!model_list_copy) + { + fclose(model_list); return; + } uint32 name_length, displayId; char buff[500]; diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 52e4e4df9cd..4bc1ca0a832 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -1239,11 +1239,11 @@ LfgAnswer LFGMgr::GetCompatibles(std::string key) void LFGMgr::GetCompatibleDungeons(LfgDungeonSet& dungeons, const PlayerSet& players, LfgLockPartyMap& lockMap) { lockMap.clear(); - for (PlayerSet::const_iterator it = players.begin(); it != players.end() && dungeons.size(); ++it) + for (PlayerSet::const_iterator it = players.begin(); it != players.end() && !dungeons.empty(); ++it) { uint64 guid = (*it)->GetGUID(); LfgLockMap cachedLockMap = GetLockedDungeons(guid); - for (LfgLockMap::const_iterator it2 = cachedLockMap.begin(); it2 != cachedLockMap.end() && dungeons.size(); ++it2) + for (LfgLockMap::const_iterator it2 = cachedLockMap.begin(); it2 != cachedLockMap.end() && !dungeons.empty(); ++it2) { uint32 dungeonId = (it2->first & 0x00FFFFFF); // Compare dungeon ids LfgDungeonSet::iterator itDungeon = dungeons.find(dungeonId); diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index d11795b1ae8..971716e24a1 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -137,7 +137,7 @@ void GameObject::AddToWorld() // The state can be changed after GameObject::Create but before GameObject::AddToWorld bool toggledState = GetGOData() ? GetGOData()->go_state == GO_STATE_READY : false; if (m_model) - GetMap()->Insert(*m_model); + GetMap()->InsertGameObjectModel(*m_model); EnableCollision(startOpen ^ toggledState); WorldObject::AddToWorld(); @@ -154,8 +154,8 @@ void GameObject::RemoveFromWorld() RemoveFromOwner(); if (m_model) - if (GetMap()->Contains(*m_model)) - GetMap()->Remove(*m_model); + if (GetMap()->ContainsGameObjectModel(*m_model)) + GetMap()->RemoveGameObjectModel(*m_model); WorldObject::RemoveFromWorld(); sObjectAccessor->RemoveObject(this); } @@ -1972,8 +1972,8 @@ void GameObject::EnableCollision(bool enable) if (!m_model) return; - /*if (enable && !GetMap()->Contains(*m_model)) - GetMap()->Insert(*m_model);*/ + /*if (enable && !GetMap()->ContainsGameObjectModel(*m_model)) + GetMap()->InsertGameObjectModel(*m_model);*/ m_model->enable(enable ? GetPhaseMask() : 0); } @@ -1983,12 +1983,12 @@ void GameObject::UpdateModel() if (!IsInWorld()) return; if (m_model) - if (GetMap()->Contains(*m_model)) - GetMap()->Remove(*m_model); + if (GetMap()->ContainsGameObjectModel(*m_model)) + GetMap()->RemoveGameObjectModel(*m_model); delete m_model; m_model = GameObjectModel::Create(*this); if (m_model) - GetMap()->Insert(*m_model); + GetMap()->InsertGameObjectModel(*m_model); } Player* GameObject::GetLootRecipient() const diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index d4da03d3b53..565a67c3631 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -987,7 +987,7 @@ class TradeData public: // constructors TradeData(Player* player, Player* trader) : m_player(player), m_trader(trader), m_accepted(false), m_acceptProccess(false), - m_money(0), m_spell(0) {} + m_money(0), m_spell(0), m_spellCastItem(0) { memset(m_items, 0, TRADE_SLOT_COUNT * sizeof(uint64)); } Player* GetTrader() const { return m_trader; } TradeData* GetTraderData() const; diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 5eb11416fdd..53588c527e3 100755 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -439,9 +439,9 @@ class Map : public GridRefManager<NGridType> float GetHeight(uint32 phasemask, float x, float y, float z, bool vmap = true, float maxSearchDist = DEFAULT_HEIGHT_SEARCH) const; bool isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask) const; void Balance() { _dynamicTree.balance(); } - void Remove(const GameObjectModel& mdl) { _dynamicTree.remove(mdl); } - void Insert(const GameObjectModel& mdl) { _dynamicTree.insert(mdl); } - bool Contains(const GameObjectModel& mdl) const { return _dynamicTree.contains(mdl);} + void RemoveGameObjectModel(const GameObjectModel& model) { _dynamicTree.remove(model); } + void InsertGameObjectModel(const GameObjectModel& model) { _dynamicTree.insert(model); } + bool ContainsGameObjectModel(const GameObjectModel& model) const { return _dynamicTree.contains(model);} bool getObjectHitPos(uint32 phasemask, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float &ry, float& rz, float modifyDist); virtual uint32 GetOwnerGuildId(uint32 /*team*/ = TEAM_OTHER) const { return 0; } diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 7d248b35853..0bf2e5664a0 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -531,6 +531,41 @@ class spell_pal_righteous_defense : public SpellScriptLoader } }; +class spell_pal_exorcism_and_holy_wrath_damage : public SpellScriptLoader +{ + public: + spell_pal_exorcism_and_holy_wrath_damage() : SpellScriptLoader("spell_pal_exorcism_and_holy_wrath_damage") { } + + class spell_pal_exorcism_and_holy_wrath_damage_AuraScript : public AuraScript + { + PrepareAuraScript(spell_pal_exorcism_and_holy_wrath_damage_AuraScript); + + void HandleEffectCalcSpellMod(AuraEffect const* aurEff, SpellModifier*& spellMod) + { + if (!spellMod) + { + spellMod = new SpellModifier(aurEff->GetBase()); + spellMod->op = SPELLMOD_DAMAGE; + spellMod->type = SPELLMOD_FLAT; + spellMod->spellId = GetId(); + spellMod->mask[1] = 0x200002; + } + + spellMod->value = aurEff->GetAmount(); + } + + void Register() + { + DoEffectCalcSpellMod += AuraEffectCalcSpellModFn(spell_pal_exorcism_and_holy_wrath_damage_AuraScript::HandleEffectCalcSpellMod, EFFECT_0, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_pal_exorcism_and_holy_wrath_damage_AuraScript(); + } +}; + void AddSC_paladin_spell_scripts() { new spell_pal_ardent_defender(); @@ -543,4 +578,5 @@ void AddSC_paladin_spell_scripts() new spell_pal_divine_storm_dummy(); new spell_pal_lay_on_hands(); new spell_pal_righteous_defense(); + new spell_pal_exorcism_and_holy_wrath_damage(); } diff --git a/src/tools/vmap4_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp index d7b2f30d349..c1e4ee26650 100644 --- a/src/tools/vmap4_extractor/vmapexport.cpp +++ b/src/tools/vmap4_extractor/vmapexport.cpp @@ -475,9 +475,9 @@ bool processArgv(int argc, char ** argv, const char *versionString) { bool result = true; bool hasInputPathParam = false; - bool preciseVectorData = false; + preciseVectorData = false; - for(int i=1; i< argc; ++i) + for(int i = 1; i < argc; ++i) { if(strcmp("-s",argv[i]) == 0) { @@ -551,7 +551,7 @@ int main(int argc, char ** argv) const char *versionString = "V4.00 2012_02"; // Use command line arguments, when some - if(!processArgv(argc, argv, versionString)) + if (!processArgv(argc, argv, versionString)) return 1; // some simple check if working dir is dirty @@ -573,7 +573,7 @@ int main(int argc, char ** argv) printf("Extract %s. Beginning work ....\n",versionString); //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx // Create the working directory - if(mkdir(szWorkDirWmo + if (mkdir(szWorkDirWmo #ifdef __linux__ , 0711 #endif @@ -601,15 +601,15 @@ int main(int argc, char ** argv) ReadLiquidTypeTableDBC(); // extract data - if(success) + if (success) success = ExtractWmo(); //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //map.dbc - if(success) + if (success) { DBCFile * dbc = new DBCFile(LocaleMpq, "DBFilesClient\\Map.dbc"); - if(!dbc->open()) + if (!dbc->open()) { delete dbc; printf("FATAL ERROR: Map.dbc not found in data file.\n"); @@ -617,7 +617,7 @@ int main(int argc, char ** argv) } map_count=dbc->getRecordCount (); map_ids=new map_id[map_count]; - for(unsigned int x=0;x<map_count;++x) + for (unsigned int x=0;x<map_count;++x) { map_ids[x].id=dbc->getRecord (x).getUInt(0); strcpy(map_ids[x].name,dbc->getRecord(x).getString(1)); @@ -637,7 +637,7 @@ int main(int argc, char ** argv) SFileCloseArchive(WorldMpq); printf("\n"); - if(!success) + if (!success) { printf("ERROR: Extract %s. Work NOT complete.\n Precise vector data=%d.\nPress any key.\n",versionString, preciseVectorData); getchar(); |
