Merge branch 'master' of github.com:TrinityCore/TrinityCore
This commit is contained in:
@@ -31,14 +31,6 @@
|
||||
#include "Util.h"
|
||||
#include "Group.h"
|
||||
|
||||
char const* petTypeSuffix[MAX_PET_TYPE] =
|
||||
{
|
||||
"'s Minion", // SUMMON_PET
|
||||
"'s Pet", // HUNTER_PET
|
||||
"'s Guardian", // GUARDIAN_PET
|
||||
"'s Companion" // MINI_PET
|
||||
};
|
||||
|
||||
#define PET_XP_FACTOR 0.05f
|
||||
|
||||
Pet::Pet(Player *owner, PetType type) : Guardian(NULL, owner),
|
||||
|
||||
@@ -30,8 +30,6 @@ enum PetType
|
||||
MAX_PET_TYPE = 4,
|
||||
};
|
||||
|
||||
extern char const* petTypeSuffix[MAX_PET_TYPE];
|
||||
|
||||
#define MAX_PET_STABLES 4
|
||||
|
||||
// stored in character_pet.slot
|
||||
|
||||
@@ -1366,7 +1366,7 @@ enum Targets
|
||||
TARGET_DEST_DEST = 87,
|
||||
TARGET_DEST_DYNOBJ_NONE = 88,
|
||||
TARGET_DEST_TRAJ = 89,
|
||||
TARGET_UNIT_TARGET_PUPPET = 90,
|
||||
TARGET_UNIT_TARGET_MINIPET = 90,
|
||||
TARGET_DEST_DEST_RANDOM_DIR_DIST = 91,
|
||||
TARGET_UNIT_SUMMONER = 92,
|
||||
TARGET_CORPSE_AREA_ENEMY_PLAYER_SRC= 93, // TODO
|
||||
|
||||
@@ -2005,7 +2005,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
|
||||
break;
|
||||
case TARGET_UNIT_TARGET_RAID:
|
||||
case TARGET_UNIT_TARGET_PARTY:
|
||||
case TARGET_UNIT_TARGET_PUPPET:
|
||||
case TARGET_UNIT_TARGET_MINIPET:
|
||||
if (IsValidSingleTargetSpell(target))
|
||||
AddUnitTarget(target, i);
|
||||
break;
|
||||
@@ -6719,8 +6719,8 @@ bool Spell::IsValidSingleTargetEffect(Unit const* target, Targets type) const
|
||||
return m_caster != target && m_caster->IsInPartyWith(target);
|
||||
case TARGET_UNIT_TARGET_RAID:
|
||||
return m_caster->IsInRaidWith(target);
|
||||
case TARGET_UNIT_TARGET_PUPPET:
|
||||
return target->HasUnitTypeMask(UNIT_MASK_PUPPET) && m_caster == target->GetOwner();
|
||||
case TARGET_UNIT_TARGET_MINIPET:
|
||||
return target->GetGUID() == m_caster->GetCritterGUID();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -3041,17 +3041,12 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
|
||||
if (!summon || !summon->HasUnitTypeMask(UNIT_MASK_MINION))
|
||||
return;
|
||||
|
||||
//summon->InitPetCreateSpells(); // e.g. disgusting oozeling has a create spell as summon...
|
||||
summon->SelectLevel(summon->GetCreatureInfo()); // some summoned creaters have different from 1 DB data for level/hp
|
||||
summon->SetUInt32Value(UNIT_NPC_FLAGS, summon->GetCreatureInfo()->npcflag);
|
||||
|
||||
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
summon->AI()->EnterEvadeMode();
|
||||
|
||||
std::string name = m_originalCaster->GetName();
|
||||
name.append(petTypeSuffix[3]);
|
||||
summon->SetName(name);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -121,7 +121,7 @@ SpellMgr::SpellMgr()
|
||||
case TARGET_UNIT_SUMMONER:
|
||||
SpellTargetType[i] = TARGET_TYPE_UNIT_CASTER;
|
||||
break;
|
||||
case TARGET_UNIT_TARGET_PUPPET:
|
||||
case TARGET_UNIT_TARGET_MINIPET:
|
||||
case TARGET_UNIT_TARGET_ALLY:
|
||||
case TARGET_UNIT_TARGET_RAID:
|
||||
case TARGET_UNIT_TARGET_ANY:
|
||||
|
||||
Reference in New Issue
Block a user