From d8b20be962fb60a56c69e8f5919b83708aa7abbd Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 16 Jan 2009 15:53:34 -0600 Subject: *Fix build. --HG-- branch : trunk --- src/game/SpellMgr.cpp | 14 ++++++++++++++ src/game/Unit.cpp | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 3bfc6503cb3..79942a2d38e 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1342,6 +1342,20 @@ bool SpellMgr::IsProfessionOrRidingSpell(uint32 spellId) return IsProfessionOrRidingSkill(skill); } +bool SpellMgr::IsProfessionSpell(uint32 spellId) +{ + SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); + if(!spellInfo) + return false; + + if(spellInfo->Effect[1] != SPELL_EFFECT_SKILL) + return false; + + uint32 skill = spellInfo->EffectMiscValue[1]; + + return IsProfessionSkill(skill); +} + bool SpellMgr::IsPrimaryProfessionSpell(uint32 spellId) { SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 9b41f52e124..e497ab25d2b 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -11702,7 +11702,7 @@ void Unit::SetCharmedOrPossessedBy(Unit* charmer, bool possess) if(possess) { addUnitState(UNIT_STAT_POSSESSED); - SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNKNOWN5); + //SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_24); AddPlayerToVision((Player*)charmer); ((Player*)charmer)->SetClientControl(this, 1); ((Player*)charmer)->SetMover(this); @@ -11754,7 +11754,7 @@ void Unit::RemoveCharmedOrPossessedBy(Unit *charmer) if(possess) { clearUnitState(UNIT_STAT_POSSESSED); - RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNKNOWN5); + //RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_24); } if(GetTypeId() == TYPEID_UNIT) -- cgit v1.2.3