*Update to HG 714.
--HG-- branch : trunk
This commit is contained in:
commit
aa3b89d776
21 files changed
+324
-47
No files matched your search
@@ -0,0 +1,2 @@
|
||||
UPDATE `creature_template` SET `ScriptName` = 'boss_shirrak_the_dead_watcher' WHERE `entry` = '18371';
|
||||
UPDATE `creature_template` SET `ScriptName` = 'mob_focus_fire', `unit_flags` = '33554434' WHERE `entry` = '18374';
|
||||
@@ -72,6 +72,7 @@ scripts/zone/alterac_mountains/alterac_mountains.cpp \
|
||||
scripts/zone/arathi_highlands/arathi_highlands.cpp \
|
||||
scripts/zone/ashenvale_forest/ashenvale.cpp\
|
||||
scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp \
|
||||
scripts/zone/aunchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp \
|
||||
scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp \
|
||||
scripts/zone/aunchindoun/mana_tombs/boss_pandemonius.cpp \
|
||||
scripts/zone/aunchindoun/sethekk_halls/boss_darkweaver_syth.cpp \
|
||||
|
||||
@@ -116,6 +116,8 @@ extern void AddSC_ashenvale();
|
||||
//Aunchindoun
|
||||
//--Auchenai Crypts
|
||||
extern void AddSC_boss_exarch_maladaar();
|
||||
extern void AddSC_boss_shirrak_the_dead_watcher();
|
||||
|
||||
//--Mana Tombs
|
||||
extern void AddSC_boss_nexusprince_shaffar();
|
||||
extern void AddSC_boss_pandemonius();
|
||||
@@ -1317,6 +1319,7 @@ void ScriptsInit()
|
||||
//Aunchindoun
|
||||
//--Auchenai Crypts
|
||||
AddSC_boss_exarch_maladaar();
|
||||
AddSC_boss_shirrak_the_dead_watcher();
|
||||
|
||||
//--Mana Tombs
|
||||
AddSC_boss_nexusprince_shaffar();
|
||||
|
||||
@@ -1259,6 +1259,10 @@
|
||||
RelativePath="..\scripts\zone\aunchindoun\auchenai_crypts\boss_exarch_maladaar.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\aunchindoun\auchenai_crypts\boss_shirrak_the_dead_watcher.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Mana Tombs"
|
||||
|
||||
@@ -1436,6 +1436,10 @@
|
||||
RelativePath="..\scripts\zone\aunchindoun\auchenai_crypts\boss_exarch_maladaar.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\aunchindoun\auchenai_crypts\boss_shirrak_the_dead_watcher.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Mana Tombs"
|
||||
|
||||
@@ -1429,6 +1429,10 @@
|
||||
RelativePath="..\scripts\zone\aunchindoun\auchenai_crypts\boss_exarch_maladaar.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\aunchindoun\auchenai_crypts\boss_shirrak_the_dead_watcher.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Mana Tombs"
|
||||
|
||||
+195
@@ -0,0 +1,195 @@
|
||||
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
Name: Boss_Shirrak_the_dead_watcher
|
||||
%Complete: 80
|
||||
Comment: InhibitMagic should stack slower far from the boss, proper Visual for Focus Fire, heroic implemented
|
||||
Category: Auchindoun, Auchenai Crypts
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#define SPELL_INHABITMAGIC 32264
|
||||
#define SPELL_ATTRACTMAGIC 32265
|
||||
#define N_SPELL_CARNIVOROUSBITE 36383
|
||||
#define H_SPELL_CARNIVOROUSBITE 39382
|
||||
#define SPELL_CARNIVOROUSBITE (HeroicMode?H_SPELL_CARNIVOROUSBITE:N_SPELL_CARNIVOROUSBITE)
|
||||
|
||||
#define ENTRY_FOCUS_FIRE 18374
|
||||
|
||||
#define N_SPELL_FIERY_BLAST 32302
|
||||
#define H_SPELL_FIERY_BLAST 38382
|
||||
#define SPELL_FIERY_BLAST (HeroicMode?H_SPELL_FIERY_BLAST:N_SPELL_FIERY_BLAST)
|
||||
#define SPELL_FOCUS_FIRE_VISUAL 42075 //need to find better visual
|
||||
|
||||
struct TRINITY_DLL_DECL boss_shirrak_the_dead_watcherAI : public ScriptedAI
|
||||
{
|
||||
boss_shirrak_the_dead_watcherAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 Inhabitmagic_Timer;
|
||||
uint32 Attractmagic_Timer;
|
||||
uint32 Carnivorousbite_Timer;
|
||||
uint32 FocusFire_Timer;
|
||||
bool HeroicMode;
|
||||
Unit *focusedTarget;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Inhabitmagic_Timer = 3000;
|
||||
Attractmagic_Timer = 28000;
|
||||
Carnivorousbite_Timer = 10000;
|
||||
FocusFire_Timer = 17000;
|
||||
focusedTarget = NULL;
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{ }
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
if (summoned && summoned->GetEntry() == ENTRY_FOCUS_FIRE)
|
||||
{
|
||||
summoned->CastSpell(summoned,SPELL_FOCUS_FIRE_VISUAL,false);
|
||||
summoned->setFaction(m_creature->getFaction());
|
||||
summoned->SetLevel(m_creature->getLevel());
|
||||
summoned->addUnitState(UNIT_STAT_ROOT);
|
||||
|
||||
if(focusedTarget)
|
||||
summoned->AI()->AttackStart(focusedTarget);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
return;
|
||||
|
||||
//Inhabitmagic_Timer
|
||||
if (Inhabitmagic_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_INHABITMAGIC);
|
||||
Inhabitmagic_Timer = 2000+(rand()%2000);
|
||||
}else Inhabitmagic_Timer -= diff;
|
||||
|
||||
//Attractmagic_Timer
|
||||
if (Attractmagic_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_ATTRACTMAGIC);
|
||||
Attractmagic_Timer = 30000;
|
||||
}else Attractmagic_Timer -= diff;
|
||||
|
||||
//Carnivorousbite_Timer
|
||||
if (Carnivorousbite_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_CARNIVOROUSBITE);
|
||||
Carnivorousbite_Timer = 10000;
|
||||
}else Carnivorousbite_Timer -= diff;
|
||||
|
||||
//FocusFire_Timer
|
||||
if (FocusFire_Timer < diff)
|
||||
{
|
||||
// Summon Focus Fire & Emote
|
||||
Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
focusedTarget = target;
|
||||
m_creature->SummonCreature(ENTRY_FOCUS_FIRE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN,5500);
|
||||
|
||||
// Emote
|
||||
std::string *emote = new std::string("focuses his energy on ");
|
||||
emote->append(target->GetName());
|
||||
DoTextEmote(emote->c_str(),NULL,true);
|
||||
delete emote;
|
||||
|
||||
FocusFire_Timer = 15000+(rand()%5000);
|
||||
}
|
||||
}else FocusFire_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_shirrak_the_dead_watcher(Creature *_Creature)
|
||||
{
|
||||
return new boss_shirrak_the_dead_watcherAI (_Creature);
|
||||
}
|
||||
|
||||
struct TRINITY_DLL_DECL mob_focus_fireAI : public ScriptedAI
|
||||
{
|
||||
mob_focus_fireAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool HeroicMode;
|
||||
uint32 FieryBlast_Timer;
|
||||
bool fiery1, fiery2, fiery3;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
FieryBlast_Timer = 3000+(rand()%1000);
|
||||
fiery1 = fiery2 = true;
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{ }
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
return;
|
||||
|
||||
//FieryBlast_Timer
|
||||
if (fiery2 && FieryBlast_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_FIERY_BLAST);
|
||||
|
||||
if(fiery1) fiery1 = false;
|
||||
else if(fiery2) fiery2 = false;
|
||||
|
||||
FieryBlast_Timer = 1000;
|
||||
}else FieryBlast_Timer -= diff;
|
||||
|
||||
//DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_focus_fire(Creature *_Creature)
|
||||
{
|
||||
return new mob_focus_fireAI (_Creature);
|
||||
}
|
||||
|
||||
void AddSC_boss_shirrak_the_dead_watcher()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name="boss_shirrak_the_dead_watcher";
|
||||
newscript->GetAI = &GetAI_boss_shirrak_the_dead_watcher;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="mob_focus_fire";
|
||||
newscript->GetAI = &GetAI_mob_focus_fire;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
+42
-16
@@ -17,7 +17,7 @@
|
||||
/* ScriptData
|
||||
SDName: Boss_Darkweaver_Syth
|
||||
SD%Complete: 85
|
||||
SDComment: Shock spells/times need more work. Heroic not implemented.
|
||||
SDComment: Shock spells/times need more work. Heroic partly implemented.
|
||||
SDCategory: Auchindoun, Sethekk Halls
|
||||
EndScriptData */
|
||||
|
||||
@@ -34,30 +34,31 @@ EndScriptData */
|
||||
|
||||
#define SAY_DEATH -1556006
|
||||
|
||||
#define SPELL_FROST_SHOCK 37865
|
||||
#define SPELL_FROST_SHOCK 21401 //37865
|
||||
#define SPELL_FLAME_SHOCK 34354
|
||||
#define SPELL_SHADOW_SHOCK 30138
|
||||
#define SPELL_ARCANE_SHOCK 37132
|
||||
|
||||
#define SPELL_CHAIN_LIGHTNING 39945
|
||||
#define SPELL_CHAIN_LIGHTNING 15659 //15305
|
||||
|
||||
#define SPELL_SUMMON_SYTH_FIRE 33537 // Spawns 19203
|
||||
#define SPELL_SUMMON_SYTH_ARCANE 33538 // Spawns 19205
|
||||
#define SPELL_SUMMON_SYTH_FROST 33539 // Spawns 19204
|
||||
#define SPELL_SUMMON_SYTH_SHADOW 33540 // Spawns 19206
|
||||
|
||||
#define SPELL_FLAME_BUFFET 33526
|
||||
#define H_SPELL_FLAME_BUFFET 38141
|
||||
#define SPELL_ARCANE_BUFFET 33527
|
||||
#define H_SPELL_ARCANE_BUFFET 38138
|
||||
#define SPELL_FROST_BUFFET 33528
|
||||
#define H_SPELL_FROST_BUFFET 38142
|
||||
#define SPELL_SHADOW_BUFFET 33529
|
||||
#define H_SPELL_SHADOW_BUFFET 38143
|
||||
#define SPELL_FLAME_BUFFET (HeroicMode?38141:33526)
|
||||
#define SPELL_ARCANE_BUFFET (HeroicMode?38138:33527)
|
||||
#define SPELL_FROST_BUFFET (HeroicMode?38142:33528)
|
||||
#define SPELL_SHADOW_BUFFET (HeroicMode?38143:33529)
|
||||
|
||||
struct TRINITY_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI
|
||||
{
|
||||
boss_darkweaver_sythAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
boss_darkweaver_sythAI(Creature *c) : ScriptedAI(c)
|
||||
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 flameshock_timer;
|
||||
uint32 arcaneshock_timer;
|
||||
@@ -68,6 +69,7 @@ struct TRINITY_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI
|
||||
bool summon90;
|
||||
bool summon50;
|
||||
bool summon10;
|
||||
bool HeroicMode;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -204,10 +206,16 @@ CreatureAI* GetAI_boss_darkweaver_syth(Creature *_Creature)
|
||||
|
||||
struct TRINITY_DLL_DECL mob_syth_fireAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_fireAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
mob_syth_fireAI(Creature *c) : ScriptedAI(c)
|
||||
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 flameshock_timer;
|
||||
uint32 flamebuffet_timer;
|
||||
bool HeroicMode;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -250,10 +258,16 @@ CreatureAI* GetAI_mob_syth_fire(Creature *_Creature)
|
||||
|
||||
struct TRINITY_DLL_DECL mob_syth_arcaneAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_arcaneAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
mob_syth_arcaneAI(Creature *c) : ScriptedAI(c)
|
||||
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 arcaneshock_timer;
|
||||
uint32 arcanebuffet_timer;
|
||||
bool HeroicMode;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -296,10 +310,16 @@ CreatureAI* GetAI_mob_syth_arcane(Creature *_Creature)
|
||||
|
||||
struct TRINITY_DLL_DECL mob_syth_frostAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_frostAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
mob_syth_frostAI(Creature *c) : ScriptedAI(c)
|
||||
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 frostshock_timer;
|
||||
uint32 frostbuffet_timer;
|
||||
bool HeroicMode;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -342,10 +362,16 @@ CreatureAI* GetAI_mob_syth_frost(Creature *_Creature)
|
||||
|
||||
struct TRINITY_DLL_DECL mob_syth_shadowAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_shadowAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
mob_syth_shadowAI(Creature *c) : ScriptedAI(c)
|
||||
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 shadowshock_timer;
|
||||
uint32 shadowbuffet_timer;
|
||||
bool HeroicMode;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
|
||||
@@ -721,8 +721,11 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacke
|
||||
{
|
||||
if(auramask & (uint64(1) << i))
|
||||
{
|
||||
*data << uint32(player->GetVisibleAura(i));
|
||||
uint32 updatedAura = player->GetVisibleAura(i);
|
||||
*data << uint32(updatedAura);
|
||||
*data << uint8(1);
|
||||
if(!updatedAura)
|
||||
player->UnsetAuraUpdateMask(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -802,8 +805,11 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacke
|
||||
{
|
||||
if(auramask & (uint64(1) << i))
|
||||
{
|
||||
*data << uint32(pet->GetVisibleAura(i));
|
||||
uint32 updatedAura = pet->GetVisibleAura(i);
|
||||
*data << uint32(updatedAura);
|
||||
*data << uint8(1);
|
||||
if(!updatedAura)
|
||||
pet->UnsetAuraUpdateMask(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ bool ChatHandler::HandleServerInfoCommand(const char* /*args*/)
|
||||
uint32 maxActiveClientsNum = sWorld.GetMaxActiveSessionCount();
|
||||
uint32 maxQueuedClientsNum = sWorld.GetMaxQueuedSessionCount();
|
||||
std::string str = secsToTimeString(sWorld.GetUptime());
|
||||
uint32 updateTime = sWorld.GetUpdateTime();
|
||||
|
||||
PSendSysMessage(_FULLVERSION); //char const* full;
|
||||
//if(m_session)
|
||||
@@ -105,6 +106,7 @@ bool ChatHandler::HandleServerInfoCommand(const char* /*args*/)
|
||||
//PSendSysMessage(LANG_USING_WORLD_DB,sWorld.GetDBVersion());
|
||||
PSendSysMessage(LANG_CONNECTED_USERS, activeClientsNum, maxActiveClientsNum, queuedClientsNum, maxQueuedClientsNum);
|
||||
PSendSysMessage(LANG_UPTIME, str.c_str());
|
||||
PSendSysMessage("Update time diff: %u.", updateTime);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+2
-1
@@ -1778,7 +1778,8 @@ bool InstanceMap::Add(Player *player)
|
||||
{
|
||||
sLog.outError("InstanceMap::Add: player %s(%d) is being put in instance %d,%d,%d,%d,%d,%d but he is in group %d and is bound to instance %d,%d,%d,%d,%d,%d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), GUID_LOPART(pGroup->GetLeaderGUID()), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset());
|
||||
if(groupBind) sLog.outError("InstanceMap::Add: the group is bound to instance %d,%d,%d,%d,%d,%d", groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty(), groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount(), groupBind->save->CanReset());
|
||||
assert(false);
|
||||
player->UnbindInstance(GetId(), GetSpawnMode());
|
||||
//assert(false);
|
||||
}
|
||||
// bind to the group or keep using the group save
|
||||
if(!groupBind)
|
||||
|
||||
+1
-1
@@ -1544,7 +1544,7 @@ Creature* WorldObject::SummonCreature(uint32 id, float x, float y, float z, floa
|
||||
{
|
||||
TemporarySummon* pCreature = new TemporarySummon(GetGUID());
|
||||
|
||||
pCreature->SetInstanceId(GetInstanceId());
|
||||
//pCreature->SetInstanceId(GetInstanceId());
|
||||
uint32 team = 0;
|
||||
if (GetTypeId()==TYPEID_PLAYER)
|
||||
team = ((Player*)this)->GetTeam();
|
||||
|
||||
@@ -882,7 +882,7 @@ void Aura::_AddAura()
|
||||
SendAuraUpdate(false);
|
||||
|
||||
// update for out of range group members
|
||||
m_target->UpdateAuraForGroup(slot, true);
|
||||
m_target->UpdateAuraForGroup(slot);
|
||||
}
|
||||
}
|
||||
else // use found slot
|
||||
@@ -970,7 +970,7 @@ void Aura::_RemoveAura()
|
||||
SendAuraUpdate(true);
|
||||
|
||||
// update for out of range group members
|
||||
m_target->UpdateAuraForGroup(slot, false);
|
||||
m_target->UpdateAuraForGroup(slot);
|
||||
|
||||
if( IsSealSpell(GetSpellProto()) )
|
||||
m_target->ModifyAuraState(AURA_STATE_JUDGEMENT,false);
|
||||
|
||||
@@ -3907,7 +3907,7 @@ void Spell::EffectEnchantItemTmp(uint32 i)
|
||||
// Shaman Rockbiter Weapon
|
||||
if(i==0 && m_spellInfo->Effect[1]==SPELL_EFFECT_DUMMY)
|
||||
{
|
||||
int32 enchnting_damage = m_currentBasePoints[1];//+1;
|
||||
int32 enchnting_damage = damage;//+1;
|
||||
|
||||
// enchanting id selected by calculated damage-per-sec stored in Effect[1] base value
|
||||
// with already applied percent bonus from Elemental Weapons talent
|
||||
|
||||
+3
-9
@@ -10675,7 +10675,7 @@ uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectT
|
||||
return CastingTime;
|
||||
}
|
||||
|
||||
void Unit::UpdateAuraForGroup(uint8 slot, bool apply)
|
||||
void Unit::UpdateAuraForGroup(uint8 slot)
|
||||
{
|
||||
if(GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
@@ -10683,10 +10683,7 @@ void Unit::UpdateAuraForGroup(uint8 slot, bool apply)
|
||||
if(player->GetGroup())
|
||||
{
|
||||
player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_AURAS);
|
||||
if(apply)
|
||||
player->SetAuraUpdateMask(slot);
|
||||
else
|
||||
player->UnsetAuraUpdateMask(slot);
|
||||
player->SetAuraUpdateMask(slot);
|
||||
}
|
||||
}
|
||||
else if(GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
|
||||
@@ -10698,10 +10695,7 @@ void Unit::UpdateAuraForGroup(uint8 slot, bool apply)
|
||||
if(owner && (owner->GetTypeId() == TYPEID_PLAYER) && ((Player*)owner)->GetGroup())
|
||||
{
|
||||
((Player*)owner)->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_AURAS);
|
||||
if(apply)
|
||||
pet->SetAuraUpdateMask(slot);
|
||||
else
|
||||
pet->UnsetAuraUpdateMask(slot);
|
||||
pet->SetAuraUpdateMask(slot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1450,7 +1450,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
void UpdateReactives(uint32 p_time);
|
||||
|
||||
// group updates
|
||||
void UpdateAuraForGroup(uint8 slot, bool apply);
|
||||
void UpdateAuraForGroup(uint8 slot);
|
||||
|
||||
// pet auras
|
||||
typedef std::set<PetAura const*> PetAuraSet;
|
||||
|
||||
@@ -107,7 +107,7 @@ WaypointMovementGenerator<Creature>::Initialize(Creature &u)
|
||||
Traveller<Creature> traveller(u);
|
||||
node = *(waypoints->at(i_currentNode));
|
||||
InitTraveller(u,node);
|
||||
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
||||
i_destinationHolder.SetDestination(traveller, node->x, node->y, node->z);
|
||||
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
||||
}*/
|
||||
}
|
||||
@@ -152,8 +152,9 @@ WaypointMovementGenerator<Creature>::Update(Creature &unit, const uint32 &diff)
|
||||
{
|
||||
if(StopedByPlayer)
|
||||
{
|
||||
InitTraveller(unit,node);
|
||||
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
||||
assert(node);
|
||||
InitTraveller(unit, *node);
|
||||
i_destinationHolder.SetDestination(traveller, node->x, node->y, node->z);
|
||||
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
||||
StopedByPlayer = false;
|
||||
return true;
|
||||
@@ -165,7 +166,7 @@ WaypointMovementGenerator<Creature>::Update(Creature &unit, const uint32 &diff)
|
||||
i_currentNode = 0; //Start moving all over again
|
||||
else
|
||||
{
|
||||
unit.SetHomePosition(node.x, node.y, node.z, unit.GetOrientation());
|
||||
unit.SetHomePosition(node->x, node->y, node->z, unit.GetOrientation());
|
||||
unit.GetMotionMaster()->Initialize();
|
||||
return false; //Clear the waypoint movement
|
||||
}
|
||||
@@ -173,24 +174,24 @@ WaypointMovementGenerator<Creature>::Update(Creature &unit, const uint32 &diff)
|
||||
else
|
||||
i_currentNode++;
|
||||
|
||||
node = *(waypoints->at(i_currentNode));
|
||||
InitTraveller(unit,node);
|
||||
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
||||
node = waypoints->at(i_currentNode);
|
||||
InitTraveller(unit, *node);
|
||||
i_destinationHolder.SetDestination(traveller, node->x, node->y, node->z);
|
||||
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
||||
}
|
||||
else
|
||||
{
|
||||
//Determine waittime
|
||||
if(node.delay)
|
||||
i_nextMoveTime.Reset(node.delay);
|
||||
if(node->delay)
|
||||
i_nextMoveTime.Reset(node->delay);
|
||||
|
||||
if(node.event_id && rand()%100 < node.event_chance)
|
||||
sWorld.ScriptsStart(sWaypointScripts, node.event_id, &unit, NULL);
|
||||
if(node->event_id && rand()%100 < node->event_chance)
|
||||
sWorld.ScriptsStart(sWaypointScripts, node->event_id, &unit, NULL);
|
||||
|
||||
MovementInform(unit);
|
||||
unit.UpdateWaypointID(i_currentNode);
|
||||
unit.clearUnitState(UNIT_STAT_MOVING);
|
||||
unit.Relocate(node.x, node.y, node.z);
|
||||
unit.Relocate(node->x, node->y, node->z);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -80,7 +80,7 @@ class TRINITY_DLL_SPEC WaypointMovementGenerator
|
||||
MovementGeneratorType GetMovementGeneratorType() { return WAYPOINT_MOTION_TYPE; }
|
||||
|
||||
private:
|
||||
WaypointData node;
|
||||
WaypointData *node;
|
||||
uint32 path_id;
|
||||
TimeTrackerSmall i_nextMoveTime;
|
||||
WaypointPath *waypoints;
|
||||
|
||||
@@ -112,6 +112,9 @@ World::World()
|
||||
|
||||
m_defaultDbcLocale = LOCALE_enUS;
|
||||
m_availableDbcLocaleMask = 0;
|
||||
|
||||
m_updateTimeSum = 0;
|
||||
m_updateTimeCount = 0;
|
||||
}
|
||||
|
||||
/// World destructor
|
||||
@@ -1021,6 +1024,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
m_configs[CONFIG_PVP_TOKEN_COUNT] = 1;
|
||||
m_configs[CONFIG_NO_RESET_TALENT_COST] = sConfig.GetBoolDefault("NoResetTalentsCost", false);
|
||||
m_configs[CONFIG_SHOW_KICK_IN_WORLD] = sConfig.GetBoolDefault("ShowKickInWorld", false);
|
||||
m_configs[CONFIG_INTERVAL_LOG_UPDATE] = sConfig.GetIntDefault("RecordUpdateTimeDiffInterval", 60000);
|
||||
|
||||
std::string forbiddenmaps = sConfig.GetStringDefault("ForbiddenMaps", "");
|
||||
char * forbiddenMaps = new char[forbiddenmaps.length() + 1];
|
||||
@@ -1450,6 +1454,22 @@ void World::DetectDBCLang()
|
||||
/// Update the World !
|
||||
void World::Update(time_t diff)
|
||||
{
|
||||
m_updateTime = uint32(diff);
|
||||
if(m_configs[CONFIG_INTERVAL_LOG_UPDATE])
|
||||
{
|
||||
if(m_updateTimeSum > m_configs[CONFIG_INTERVAL_LOG_UPDATE])
|
||||
{
|
||||
sLog.outString("Update time diff: %u. Players online: %u.", m_updateTimeSum / m_updateTimeCount, GetActiveSessionCount());
|
||||
m_updateTimeSum = m_updateTime;
|
||||
m_updateTimeCount = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_updateTimeSum += m_updateTime;
|
||||
++m_updateTimeCount;
|
||||
}
|
||||
}
|
||||
|
||||
///- Update the different timers
|
||||
for(int i = 0; i < WUPDATE_COUNT; i++)
|
||||
if(m_timers[i].GetCurrent()>=0)
|
||||
|
||||
@@ -203,6 +203,7 @@ enum WorldConfigs
|
||||
CONFIG_PVP_TOKEN_COUNT,
|
||||
CONFIG_NO_RESET_TALENT_COST,
|
||||
CONFIG_SHOW_KICK_IN_WORLD,
|
||||
CONFIG_INTERVAL_LOG_UPDATE,
|
||||
|
||||
CONFIG_VALUE_COUNT
|
||||
};
|
||||
@@ -414,6 +415,8 @@ class World
|
||||
time_t const& GetGameTime() const { return m_gameTime; }
|
||||
/// Uptime (in secs)
|
||||
uint32 GetUptime() const { return uint32(m_gameTime - m_startTime); }
|
||||
/// Update time
|
||||
uint32 GetUpdateTime() const { return m_updateTime; }
|
||||
|
||||
/// Get the maximum skill level a player can reach
|
||||
uint16 GetConfigMaxSkillValue() const
|
||||
@@ -531,6 +534,8 @@ class World
|
||||
IntervalTimer m_timers[WUPDATE_COUNT];
|
||||
uint32 mail_timer;
|
||||
uint32 mail_timer_expires;
|
||||
uint32 m_updateTime, m_updateTimeSum;
|
||||
uint32 m_updateTimeCount;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, Weather*> WeatherMap;
|
||||
WeatherMap m_weathers;
|
||||
|
||||
@@ -1251,12 +1251,20 @@ Ra.Secure = 1
|
||||
# example: "538,90"
|
||||
# Note that it's HIGHLY DISCOURAGED to forbid starting maps (0, 1, 530)!
|
||||
#
|
||||
# ShowKickInWorld
|
||||
# ShowKickInWorld
|
||||
# determines wether a message is broadcasted to the entire server when a player gets kicked
|
||||
# Default: 0
|
||||
# 1 = Enable
|
||||
# 0 = Disable
|
||||
#
|
||||
# RecordUpdateTimeDiffInterval
|
||||
# record update time diff to the log file
|
||||
# update diff can be used as a criterion of performance
|
||||
# diff < 300: good performance
|
||||
# diff > 600: bad performance, may be caused by high cpu usage
|
||||
# Default: 60000 (diff is written into log every 60000 ms or 1 minute.
|
||||
# >0 = Interval
|
||||
# 0 = Disable
|
||||
###################################################################################################################
|
||||
|
||||
PlayerStart.AllReputation = 0
|
||||
@@ -1271,3 +1279,4 @@ PvPToken.ItemID = 29434
|
||||
PvPToken.ItemCount = 1
|
||||
NoResetTalentsCost = 0
|
||||
ShowKickInWorld = 0
|
||||
RecordUpdateTimeDiffInterval = 60000
|
||||
Reference in new issue
Block a user