Merge commit 'origin/master' into 320

This commit is contained in:
tomrus88 2009-07-17 13:26:56 +04:00
commit ca2a2195be
22 changed files with 80 additions and 234 deletions

View file

@ -23,7 +23,7 @@ DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` (
`version` varchar(120) default NULL,
`creature_ai_version` varchar(120) default NULL,
`required_8158_01_mangos_playercreateinfo_action` bit(1) default NULL
`required_8191_01_mangos_spell_affect` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--
@ -789,8 +789,8 @@ DROP TABLE IF EXISTS `creature_template`;
CREATE TABLE `creature_template` (
`entry` mediumint(8) unsigned NOT NULL default '0',
`heroic_entry` mediumint(8) unsigned NOT NULL default '0',
`unk1` int(11) UNSIGNED DEFAULT '0' NOT NULL,
`unk2` int(11) UNSIGNED DEFAULT '0' NOT NULL,
`KillCredit1` int(11) unsigned NOT NULL default '0',
`KillCredit2` int(11) unsigned NOT NULL default '0',
`modelid_A` mediumint(8) unsigned NOT NULL default '0',
`modelid_A2` mediumint(8) unsigned NOT NULL default '0',
`modelid_H` mediumint(8) unsigned NOT NULL default '0',
@ -13542,29 +13542,6 @@ LOCK TABLES `skinning_loot_template` WRITE;
/*!40000 ALTER TABLE `skinning_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_affect`
--
DROP TABLE IF EXISTS `spell_affect`;
CREATE TABLE `spell_affect` (
`entry` smallint(5) unsigned NOT NULL default '0',
`effectId` tinyint(3) unsigned NOT NULL default '0',
`SpellClassMask0` int(5) unsigned NOT NULL default '0',
`SpellClassMask1` int(5) unsigned NOT NULL default '0',
`SpellClassMask2` int(5) unsigned NOT NULL default '0',
PRIMARY KEY (`entry`,`effectId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `spell_affect`
--
LOCK TABLES `spell_affect` WRITE;
/*!40000 ALTER TABLE `spell_affect` DISABLE KEYS */;
/*!40000 ALTER TABLE `spell_affect` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_area`
--

View file

@ -0,0 +1,5 @@
ALTER TABLE db_version CHANGE COLUMN required_8158_01_mangos_playercreateinfo_action required_8190_01_mangos_creature_template bit;
ALTER TABLE `creature_template`
CHANGE COLUMN `unk1` `KillCredit1` int(11) unsigned NOT NULL default '0',
CHANGE COLUMN `unk2` `KillCredit2` int(11) unsigned NOT NULL default '0';

View file

@ -0,0 +1,3 @@
ALTER TABLE db_version CHANGE COLUMN required_8190_01_mangos_creature_template required_8191_01_mangos_spell_affect bit;
DROP TABLE IF EXISTS `spell_affect`;

View file

@ -244,6 +244,8 @@ pkgdata_DATA = \
8115_01_mangos_playercreateinfo_action.sql \
8140_01_mangos_spell_proc_event.sql \
8158_01_mangos_playercreateinfo_action.sql \
8190_01_mangos_creature_template.sql \
8191_01_mangos_spell_affect.sql \
README
## Additional files to include when running 'make dist'
@ -468,4 +470,6 @@ EXTRA_DIST = \
8115_01_mangos_playercreateinfo_action.sql \
8140_01_mangos_spell_proc_event.sql \
8158_01_mangos_playercreateinfo_action.sql \
8190_01_mangos_creature_template.sql \
8191_01_mangos_spell_affect.sql \
README

View file

@ -443,7 +443,6 @@ ChatCommand * ChatHandler::getCommandTable()
{ "skill_extra_item_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSkillExtraItemTemplateCommand, "", NULL },
{ "skill_fishing_base_level", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSkillFishingBaseLevelCommand, "", NULL },
{ "skinning_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesSkinningCommand, "", NULL },
{ "spell_affect", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellAffectCommand, "", NULL },
{ "spell_area", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellAreaCommand, "", NULL },
{ "spell_bonus_data", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellBonusesCommand, "", NULL },
{ "spell_chain", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellChainCommand, "", NULL },

View file

@ -370,7 +370,6 @@ class ChatHandler
bool HandleReloadSkillDiscoveryTemplateCommand(const char* args);
bool HandleReloadSkillExtraItemTemplateCommand(const char* args);
bool HandleReloadSkillFishingBaseLevelCommand(const char* args);
bool HandleReloadSpellAffectCommand(const char* args);
bool HandleReloadSpellAreaCommand(const char* args);
bool HandleReloadSpellChainCommand(const char* args);
bool HandleReloadSpellElixirCommand(const char* args);

View file

@ -152,13 +152,14 @@ enum CreatureFlagsExtra
#pragma pack(push,1)
#endif
#define MAX_KILL_CREDIT 2
// from `creature_template` table
struct CreatureInfo
{
uint32 Entry;
uint32 HeroicEntry;
uint32 unk1;
uint32 unk2;
uint32 KillCredit[MAX_KILL_CREDIT];
uint32 DisplayID_A[2];
uint32 DisplayID_H[2];
char* Name;

View file

@ -157,7 +157,8 @@ bool ChatHandler::HandleGMListIngameCommand(const char* /*args*/)
HashMapHolder<Player>::MapType::const_iterator itr = m.begin();
for(; itr != m.end(); ++itr)
{
if ((itr->second->isGameMaster() || itr->second->GetSession()->GetSecurity() <= sWorld.getConfig(CONFIG_GM_LEVEL_IN_GM_LIST)) &&
AccountTypes itr_sec = itr->second->GetSession()->GetSecurity();
if ((itr->second->isGameMaster() || itr_sec > SEC_PLAYER && itr_sec <= sWorld.getConfig(CONFIG_GM_LEVEL_IN_GM_LIST)) &&
(!m_session || itr->second->IsVisibleGloballyFor(m_session->GetPlayer())))
{
if(first)

View file

@ -151,7 +151,6 @@ bool ChatHandler::HandleReloadAllSpellCommand(const char*)
{
HandleReloadSkillDiscoveryTemplateCommand("a");
HandleReloadSkillExtraItemTemplateCommand("a");
HandleReloadSpellAffectCommand("a");
HandleReloadSpellAreaCommand("a");
HandleReloadSpellChainCommand("a");
HandleReloadSpellElixirCommand("a");
@ -481,14 +480,6 @@ bool ChatHandler::HandleReloadSkillFishingBaseLevelCommand(const char* /*args*/)
return true;
}
bool ChatHandler::HandleReloadSpellAffectCommand(const char*)
{
sLog.outString( "Re-Loading SpellAffect definitions..." );
spellmgr.LoadSpellAffects();
SendGlobalSysMessage("DB table `spell_affect` (spell mods apply requirements) reloaded.");
return true;
}
bool ChatHandler::HandleReloadSpellAreaCommand(const char*)
{
sLog.outString( "Re-Loading SpellArea Data..." );
@ -4835,8 +4826,9 @@ bool ChatHandler::HandleQuestComplete(const char* args)
}
else if(creature > 0)
{
if(CreatureInfo const* cInfo = objmgr.GetCreatureTemplate(creature))
for(uint16 z = 0; z < creaturecount; ++z)
player->KilledMonster(creature,0);
player->KilledMonster(cInfo,0);
}
else if(creature < 0)
{

View file

@ -1499,8 +1499,6 @@ void WorldObject::MonsterWhisper(int32 textId, uint64 receiver, bool IsBossWhisp
void WorldObject::BuildMonsterChat(WorldPacket *data, uint8 msgtype, char const* text, uint32 language, char const* name, uint64 targetGuid) const
{
bool pre = (msgtype==CHAT_MSG_MONSTER_EMOTE || msgtype==CHAT_MSG_RAID_BOSS_EMOTE);
*data << (uint8)msgtype;
*data << (uint32)language;
*data << (uint64)GetGUID();
@ -1513,9 +1511,7 @@ void WorldObject::BuildMonsterChat(WorldPacket *data, uint8 msgtype, char const*
*data << (uint32)1; // target name length
*data << (uint8)0; // target name
}
*data << (uint32)(strlen(text)+1+(pre?3:0));
if(pre)
data->append("%s ",3);
*data << (uint32)(strlen(text)+1);
*data << text;
*data << (uint8)0; // ChatTag
}

View file

@ -640,6 +640,18 @@ void ObjectMgr::LoadCreatureTemplates()
if (!displayScaleEntry)
sLog.outErrorDb("Creature (Entry: %u) not has any existed display id in DisplayID_A/DisplayID_A2/DisplayID_H/DisplayID_H2", cInfo->Entry);
for(int k = 0; k < MAX_KILL_CREDIT; ++k)
{
if(cInfo->KillCredit[k])
{
if(!GetCreatureTemplate(cInfo->KillCredit[k]))
{
sLog.outErrorDb("Creature (Entry: %u) has not existed creature entry in `KillCredit%d` (%u)",cInfo->Entry,k+1,cInfo->KillCredit[k]);
const_cast<CreatureInfo*>(cInfo)->KillCredit[k] = 0;
}
}
}
if (cInfo->unit_class && ((1 << (cInfo->unit_class-1)) & CLASSMASK_ALL_CREATURES) == 0)
sLog.outErrorDb("Creature (Entry: %u) has invalid unit_class(%u) for creature_template", cInfo->Entry, cInfo->unit_class);

View file

@ -13397,7 +13397,17 @@ void Player::ItemRemovedQuestCheck( uint32 entry, uint32 count )
UpdateForQuestWorldObjects();
}
void Player::KilledMonster( uint32 entry, uint64 guid )
void Player::KilledMonster( CreatureInfo const* cInfo, uint64 guid )
{
if(cInfo->Entry)
KilledMonsterCredit(cInfo->Entry,guid);
for(int i = 0; i < MAX_KILL_CREDIT; ++i)
if(cInfo->KillCredit[i])
KilledMonsterCredit(cInfo->KillCredit[i],guid);
}
void Player::KilledMonsterCredit( uint32 entry, uint64 guid )
{
uint32 addkillcount = 1;
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, entry, addkillcount);
@ -18925,7 +18935,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
{
// normal creature (not pet/etc) can be only in !PvP case
if(pVictim->GetTypeId()==TYPEID_UNIT)
pGroupGuy->KilledMonster(pVictim->GetEntry(), pVictim->GetGUID());
pGroupGuy->KilledMonster(((Creature*)pVictim)->GetCreatureInfo(), pVictim->GetGUID());
}
}
}
@ -18950,7 +18960,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
// normal creature (not pet/etc) can be only in !PvP case
if(pVictim->GetTypeId()==TYPEID_UNIT)
KilledMonster(pVictim->GetEntry(),pVictim->GetGUID());
KilledMonster(((Creature*)pVictim)->GetCreatureInfo(), pVictim->GetGUID());
}
}
return xp || honored_kill;
@ -18974,11 +18984,11 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar
// quest objectives updated only for alive group member or dead but with not released body
if(pGroupGuy->isAlive()|| !pGroupGuy->GetCorpse())
pGroupGuy->KilledMonster(creature_id, creature_guid);
pGroupGuy->KilledMonsterCredit(creature_id, creature_guid);
}
}
else // if (!pGroup)
KilledMonster(creature_id, creature_guid);
KilledMonsterCredit(creature_id, creature_guid);
}
bool Player::IsAtGroupRewardDistance(WorldObject const* pRewardSource) const

View file

@ -1305,7 +1305,8 @@ class MANGOS_DLL_SPEC Player : public Unit
void GroupEventHappens( uint32 questId, WorldObject const* pEventObject );
void ItemAddedQuestCheck( uint32 entry, uint32 count );
void ItemRemovedQuestCheck( uint32 entry, uint32 count );
void KilledMonster( uint32 entry, uint64 guid );
void KilledMonster( CreatureInfo const* cInfo, uint64 guid );
void KilledMonsterCredit( uint32 entry, uint64 guid );
void CastedCreatureOrGO( uint32 entry, uint64 guid, uint32 spell_id );
void TalkedToCreature( uint32 entry, uint64 guid );
void MoneyChanged( uint32 value );

View file

@ -189,8 +189,8 @@ void WorldSession::HandleCreatureQueryOpcode( WorldPacket & recv_data )
data << uint32(ci->type); // CreatureType.dbc
data << uint32(ci->family); // CreatureFamily.dbc
data << uint32(ci->rank); // Creature Rank (elite, boss, etc)
data << uint32(ci->unk1); // new in 3.1, creature entry?
data << uint32(ci->unk2); // new in 3.1, creature entry?
data << uint32(ci->KillCredit[0]); // new in 3.1, kill credit
data << uint32(ci->KillCredit[1]); // new in 3.1, kill credit
data << uint32(ci->DisplayID_A[0]); // modelid_male1
data << uint32(ci->DisplayID_H[0]); // modelid_female1 ?
data << uint32(ci->DisplayID_A[1]); // modelid_male2 ?

View file

@ -24,6 +24,7 @@
#include "Util.h"
#include "SkillDiscovery.h"
#include "SpellMgr.h"
#include "Player.h"
#include <map>
struct SkillDiscoveryEntry

View file

@ -1294,11 +1294,6 @@ void Aura::HandleAddModifier(bool apply, bool Real)
mod->spellId = GetId();
uint32 const *ptr;
SpellAffectEntry const *spellAffect = spellmgr.GetSpellAffect(GetId(), m_effIndex);
if (spellAffect)
ptr = &spellAffect->SpellClassMask[0];
else
{
switch (m_effIndex)
{
case 0: ptr = &m_spellProto->EffectSpellClassMaskA[0]; break;
@ -1307,7 +1302,6 @@ void Aura::HandleAddModifier(bool apply, bool Real)
default:
return;
}
}
mod->mask = (uint64)ptr[0] | (uint64)ptr[1]<<32;
mod->mask2= (uint64)ptr[2];
@ -1340,11 +1334,6 @@ void Aura::HandleAddTargetTrigger(bool apply, bool /*Real*/)
mod->spellId = GetId();
uint32 const *ptr;
SpellAffectEntry const *spellAffect = spellmgr.GetSpellAffect(GetId(), m_effIndex);
if (spellAffect)
ptr = &spellAffect->SpellClassMask[0];
else
{
switch (m_effIndex)
{
case 0: ptr = &m_spellProto->EffectSpellClassMaskA[0]; break;
@ -1353,7 +1342,6 @@ void Aura::HandleAddTargetTrigger(bool apply, bool /*Real*/)
default:
return;
}
}
mod->mask = (uint64)ptr[0] | (uint64)ptr[1]<<32;
mod->mask2= (uint64)ptr[2];

View file

@ -681,126 +681,6 @@ void SpellMgr::LoadSpellTargetPositions()
sLog.outString( ">> Loaded %u spell teleport coordinates", count );
}
void SpellMgr::LoadSpellAffects()
{
mSpellAffectMap.clear(); // need for reload case
uint32 count = 0;
// 0 1 2 3 4
QueryResult *result = WorldDatabase.Query("SELECT entry, effectId, SpellClassMask0, SpellClassMask1, SpellClassMask2 FROM spell_affect");
if( !result )
{
barGoLink bar( 1 );
bar.step();
sLog.outString();
sLog.outString( ">> Loaded %u spell affect definitions", count );
return;
}
barGoLink bar( result->GetRowCount() );
do
{
Field *fields = result->Fetch();
bar.step();
uint32 entry = fields[0].GetUInt32();
uint8 effectId = fields[1].GetUInt8();
SpellEntry const* spellInfo = sSpellStore.LookupEntry(entry);
if (!spellInfo)
{
sLog.outErrorDb("Spell %u listed in `spell_affect` does not exist", entry);
continue;
}
if (effectId >= 3)
{
sLog.outErrorDb("Spell %u listed in `spell_affect` have invalid effect index (%u)", entry,effectId);
continue;
}
if( spellInfo->Effect[effectId] != SPELL_EFFECT_APPLY_AURA ||
spellInfo->EffectApplyAuraName[effectId] != SPELL_AURA_ADD_FLAT_MODIFIER &&
spellInfo->EffectApplyAuraName[effectId] != SPELL_AURA_ADD_PCT_MODIFIER &&
spellInfo->EffectApplyAuraName[effectId] != SPELL_AURA_ADD_TARGET_TRIGGER )
{
sLog.outErrorDb("Spell %u listed in `spell_affect` have not SPELL_AURA_ADD_FLAT_MODIFIER (%u) or SPELL_AURA_ADD_PCT_MODIFIER (%u) or SPELL_AURA_ADD_TARGET_TRIGGER (%u) for effect index (%u)", entry,SPELL_AURA_ADD_FLAT_MODIFIER,SPELL_AURA_ADD_PCT_MODIFIER,SPELL_AURA_ADD_TARGET_TRIGGER,effectId);
continue;
}
SpellAffectEntry affect;
affect.SpellClassMask[0] = fields[2].GetUInt32();
affect.SpellClassMask[1] = fields[3].GetUInt32();
affect.SpellClassMask[2] = fields[4].GetUInt32();
// Spell.dbc have own data
uint32 const *ptr = 0;
switch (effectId)
{
case 0: ptr = &spellInfo->EffectSpellClassMaskA[0]; break;
case 1: ptr = &spellInfo->EffectSpellClassMaskB[0]; break;
case 2: ptr = &spellInfo->EffectSpellClassMaskC[0]; break;
default:
continue;
}
if(ptr[0] == affect.SpellClassMask[0] || ptr[1] == affect.SpellClassMask[1] || ptr[2] == affect.SpellClassMask[2])
{
char text[]="ABC";
sLog.outErrorDb("Spell %u listed in `spell_affect` have redundant (same with EffectSpellClassMask%c) data for effect index (%u) and not needed, skipped.", entry, text[effectId], effectId);
continue;
}
mSpellAffectMap[(entry<<8) + effectId] = affect;
++count;
} while( result->NextRow() );
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u custom spell affect definitions", count );
for (uint32 id = 0; id < sSpellStore.GetNumRows(); ++id)
{
SpellEntry const* spellInfo = sSpellStore.LookupEntry(id);
if (!spellInfo)
continue;
for (int effectId = 0; effectId < 3; ++effectId)
{
if( spellInfo->Effect[effectId] != SPELL_EFFECT_APPLY_AURA ||
(spellInfo->EffectApplyAuraName[effectId] != SPELL_AURA_ADD_FLAT_MODIFIER &&
spellInfo->EffectApplyAuraName[effectId] != SPELL_AURA_ADD_PCT_MODIFIER &&
spellInfo->EffectApplyAuraName[effectId] != SPELL_AURA_ADD_TARGET_TRIGGER) )
continue;
uint32 const *ptr = 0;
switch (effectId)
{
case 0: ptr = &spellInfo->EffectSpellClassMaskA[0]; break;
case 1: ptr = &spellInfo->EffectSpellClassMaskB[0]; break;
case 2: ptr = &spellInfo->EffectSpellClassMaskC[0]; break;
default:
continue;
}
if(ptr[0] || ptr[1] || ptr[2])
continue;
if(mSpellAffectMap.find((id<<8) + effectId) != mSpellAffectMap.end())
continue;
sLog.outErrorDb("Spell %u (%s) misses spell_affect for effect %u",id,spellInfo->SpellName[sWorld.GetDefaultDbcLocale()], effectId);
}
}
}
bool SpellMgr::IsAffectedByMod(SpellEntry const *spellInfo, SpellModifier *mod) const
{
// false for spellInfo == NULL
@ -3027,13 +2907,6 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
return DIMINISHING_LIMITONLY;
break;
}
case SPELLFAMILY_PALADIN:
{
// Turn Evil
if (spellproto->SpellFamilyFlags & UI64LIT(0x00804000000000))
return DIMINISHING_FEAR_BLIND;
break;
}
case SPELLFAMILY_DEATHKNIGHT:
{
// Hungering Cold (no flags)
@ -3048,16 +2921,19 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
// Get by mechanic
uint32 mechanic = GetAllSpellMechanicMask(spellproto);
if (mechanic == MECHANIC_NONE) return DIMINISHING_NONE;
if (mechanic & (1<<MECHANIC_STUN)) return triggered ? DIMINISHING_TRIGGER_STUN : DIMINISHING_CONTROL_STUN;
if (mechanic & ((1<<MECHANIC_STUN) |
(1<<MECHANIC_SHACKLE))) return triggered ? DIMINISHING_TRIGGER_STUN : DIMINISHING_CONTROL_STUN;
if (mechanic & (1<<MECHANIC_SLEEP)) return DIMINISHING_FREEZE_SLEEP;
if (mechanic & (1<<MECHANIC_POLYMORPH)) return DIMINISHING_POLYMORPH_GOUGE_SAP;
if (mechanic & (1<<MECHANIC_ROOT)) return triggered ? DIMINISHING_TRIGGER_ROOT : DIMINISHING_CONTROL_ROOT;
if (mechanic & (1<<MECHANIC_FEAR)) return DIMINISHING_FEAR_BLIND;
if (mechanic & ((1<<MECHANIC_FEAR) |
(1<<MECHANIC_TURN))) return DIMINISHING_FEAR_BLIND;
if (mechanic & (1<<MECHANIC_CHARM)) return DIMINISHING_CHARM;
if (mechanic & (1<<MECHANIC_SILENCE)) return DIMINISHING_SILENCE;
if (mechanic & (1<<MECHANIC_DISARM)) return DIMINISHING_DISARM;
if (mechanic & (1<<MECHANIC_FREEZE)) return DIMINISHING_FREEZE_SLEEP;
if (mechanic & ((1<<MECHANIC_KNOCKOUT) | (1<<MECHANIC_SAPPED))) return DIMINISHING_POLYMORPH_GOUGE_SAP;
if (mechanic & ((1<<MECHANIC_KNOCKOUT) |
(1<<MECHANIC_SAPPED))) return DIMINISHING_POLYMORPH_GOUGE_SAP;
if (mechanic & (1<<MECHANIC_BANISH)) return DIMINISHING_BANISH;
if (mechanic & (1<<MECHANIC_HORROR)) return DIMINISHING_DEATHCOIL;

View file

@ -23,17 +23,18 @@
// For more high level function for sSpellStore data
#include "SharedDefines.h"
#include "SpellAuraDefines.h"
#include "DBCStructure.h"
#include "DBCStores.h"
#include "Database/SQLStorage.h"
#include "Utilities/UnorderedMap.h"
#include "Player.h"
#include <map>
class Player;
class Spell;
struct SpellModifier;
extern SQLStorage sSpellThreatStore;
@ -341,13 +342,6 @@ bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group);
DiminishingReturnsType GetDiminishingReturnsGroupType(DiminishingGroup group);
int32 GetDiminishingReturnsLimitDuration(DiminishingGroup group, SpellEntry const* spellproto);
// Spell affects related declarations (accessed using SpellMgr functions)
struct SpellAffectEntry
{
uint32 SpellClassMask[3];
};
typedef UNORDERED_MAP<uint32, SpellAffectEntry> SpellAffectMap;
// Spell proc event related declarations (accessed using SpellMgr functions)
enum ProcFlags
{
@ -638,14 +632,6 @@ class SpellMgr
// Accessors (const or static functions)
public:
// Spell affects
SpellAffectEntry const*GetSpellAffect(uint32 spellId, uint8 effectId) const
{
SpellAffectMap::const_iterator itr = mSpellAffectMap.find((spellId<<8) + effectId);
if( itr != mSpellAffectMap.end( ) )
return &itr->second;
return 0;
}
bool IsAffectedByMod(SpellEntry const *spellInfo, SpellModifier *mod) const;
@ -907,7 +893,6 @@ class SpellMgr
void LoadSpellLearnSkills();
void LoadSpellLearnSpells();
void LoadSpellScriptTarget();
void LoadSpellAffects();
void LoadSpellElixirs();
void LoadSpellProcEvents();
void LoadSpellBonusess();
@ -926,7 +911,6 @@ class SpellMgr
SpellLearnSkillMap mSpellLearnSkills;
SpellLearnSpellMap mSpellLearnSpells;
SpellTargetPositionMap mSpellTargetPositions;
SpellAffectMap mSpellAffectMap;
SpellElixirMap mSpellElixirs;
SpellProcEventMap mSpellProcEventMap;
SpellBonusMap mSpellBonusMap;

View file

@ -450,7 +450,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
// some critters required for quests
if(GetTypeId() == TYPEID_PLAYER)
((Player*)this)->KilledMonster(pVictim->GetEntry(),pVictim->GetGUID());
((Player*)this)->KilledMonster(cInfo ,pVictim->GetGUID());
return damage;
}

View file

@ -1253,9 +1253,6 @@ void World::SetInitialWorldSettings()
sLog.outString( "Loading Spell target coordinates..." );
spellmgr.LoadSpellTargetPositions();
sLog.outString( "Loading SpellAffect definitions..." );
spellmgr.LoadSpellAffects();
sLog.outString( "Loading spell pet auras..." );
spellmgr.LoadSpellPetAuras();

View file

@ -874,7 +874,7 @@ Channel.SilentlyGMJoin = 0
#
# GM.InGMList.Level
# Max GM level showed in GM list (if visible) in non-GM state (.gm off)
# 0 (only players)
# 0 (none)
# 1 (only moderators)
# 2 (only gamemasters)
# Default: 3 (anyone)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8186"
#define REVISION_NR "8192"
#endif // __REVISION_NR_H__