*Fix a typo and add some missing content.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-07 00:53:01 -06:00
parent 6ae4f909d0
commit 5627f5e838
2 changed files with 3 additions and 6 deletions
+2 -5
View File
@@ -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;
} }
@@ -1714,7 +1711,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);
@@ -1735,7 +1732,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);
+1 -1
View File
@@ -8342,7 +8342,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();