*Merge.
--HG-- branch : trunk
This commit is contained in:
+2
-5
@@ -1015,7 +1015,6 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell)
|
|||||||
|
|
||||||
RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell);
|
RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell);
|
||||||
AddToGrid(c,getNGrid(new_cell.GridX(), new_cell.GridY()),new_cell);
|
AddToGrid(c,getNGrid(new_cell.GridX(), new_cell.GridY()),new_cell);
|
||||||
c->SetCurrentCell(new_cell);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1040,7 +1039,6 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell)
|
|||||||
|
|
||||||
RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell);
|
RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell);
|
||||||
AddToGrid(c,getNGrid(new_cell.GridX(), new_cell.GridY()),new_cell);
|
AddToGrid(c,getNGrid(new_cell.GridX(), new_cell.GridY()),new_cell);
|
||||||
c->SetCurrentCell(new_cell);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1056,7 +1054,6 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell)
|
|||||||
RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell);
|
RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell);
|
||||||
EnsureGridCreated(GridPair(new_cell.GridX(), new_cell.GridY()));
|
EnsureGridCreated(GridPair(new_cell.GridX(), new_cell.GridY()));
|
||||||
AddToGrid(c,getNGrid(new_cell.GridX(), new_cell.GridY()),new_cell);
|
AddToGrid(c,getNGrid(new_cell.GridX(), new_cell.GridY()),new_cell);
|
||||||
c->SetCurrentCell(new_cell);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1730,7 +1727,7 @@ void Map::AddToActive( Creature* c )
|
|||||||
AddToActiveHelper(c);
|
AddToActiveHelper(c);
|
||||||
|
|
||||||
// also not allow unloading spawn grid to prevent creating creature clone at load
|
// also not allow unloading spawn grid to prevent creating creature clone at load
|
||||||
if(c->GetDBTableGUIDLow())
|
if(!c->isPet() && c->GetDBTableGUIDLow())
|
||||||
{
|
{
|
||||||
float x,y,z;
|
float x,y,z;
|
||||||
c->GetRespawnCoord(x,y,z);
|
c->GetRespawnCoord(x,y,z);
|
||||||
@@ -1751,7 +1748,7 @@ void Map::RemoveFromActive( Creature* c )
|
|||||||
RemoveFromActiveHelper(c);
|
RemoveFromActiveHelper(c);
|
||||||
|
|
||||||
// also allow unloading spawn grid
|
// also allow unloading spawn grid
|
||||||
if(c->GetDBTableGUIDLow())
|
if(!c->isPet() && c->GetDBTableGUIDLow())
|
||||||
{
|
{
|
||||||
float x,y,z;
|
float x,y,z;
|
||||||
c->GetRespawnCoord(x,y,z);
|
c->GetRespawnCoord(x,y,z);
|
||||||
|
|||||||
@@ -124,10 +124,8 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
|
|||||||
if (pet->getVictim())
|
if (pet->getVictim())
|
||||||
pet->AttackStop();
|
pet->AttackStop();
|
||||||
|
|
||||||
if(pet->GetTypeId() != TYPEID_PLAYER)
|
if(pet->GetTypeId() != TYPEID_PLAYER && ((Creature*)pet)->IsAIEnabled)
|
||||||
{
|
{
|
||||||
pet->GetMotionMaster()->Clear();
|
|
||||||
if (((Creature*)pet)->IsAIEnabled)
|
|
||||||
((Creature*)pet)->AI()->AttackStart(TargetUnit);
|
((Creature*)pet)->AI()->AttackStart(TargetUnit);
|
||||||
|
|
||||||
//10% chance to play special pet attack talk, else growl
|
//10% chance to play special pet attack talk, else growl
|
||||||
|
|||||||
@@ -6536,11 +6536,14 @@ void Aura::HandleModPossessPet(bool apply, bool Real)
|
|||||||
Unit* caster = GetCaster();
|
Unit* caster = GetCaster();
|
||||||
if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(apply)
|
||||||
|
{
|
||||||
if(caster->GetPet() != m_target)
|
if(caster->GetPet() != m_target)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(apply)
|
|
||||||
m_target->SetCharmedOrPossessedBy(caster, true);
|
m_target->SetCharmedOrPossessedBy(caster, true);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_target->RemoveCharmedOrPossessedBy(caster);
|
m_target->RemoveCharmedOrPossessedBy(caster);
|
||||||
|
|||||||
+1
-1
@@ -7704,7 +7704,7 @@ bool Unit::AttackStop()
|
|||||||
|
|
||||||
void Unit::CombatStop(bool cast)
|
void Unit::CombatStop(bool cast)
|
||||||
{
|
{
|
||||||
if(cast& IsNonMeleeSpellCasted(false))
|
if(cast && IsNonMeleeSpellCasted(false))
|
||||||
InterruptNonMeleeSpells(false);
|
InterruptNonMeleeSpells(false);
|
||||||
|
|
||||||
AttackStop();
|
AttackStop();
|
||||||
|
|||||||
Reference in New Issue
Block a user