*Merge with 551.
--HG-- branch : trunk
This commit is contained in:
+3
-2
@@ -438,19 +438,20 @@ Map::LoadGrid(const Cell& cell, bool no_unload)
|
||||
{
|
||||
ObjectGridLoader loader(*grid, this, cell);
|
||||
loader.LoadN();
|
||||
setGridObjectDataLoaded(true,cell.GridX(), cell.GridY());
|
||||
|
||||
// Add resurrectable corpses to world object list in grid
|
||||
ObjectAccessor::Instance().AddCorpsesToGrid(GridPair(cell.GridX(),cell.GridY()),(*grid)(cell.CellX(), cell.CellY()), this);
|
||||
|
||||
setGridObjectDataLoaded(true,cell.GridX(), cell.GridY());
|
||||
// Not sure if this is the reason that far sight cause crash
|
||||
// Seems crash happens when trying to delete a far sight dynobj from an unopened grid
|
||||
ResetGridExpiry(*getNGrid(cell.GridX(), cell.GridY()), 1.0f);
|
||||
grid->SetGridState(GRID_STATE_ACTIVE);
|
||||
|
||||
if(no_unload)
|
||||
getNGrid(cell.GridX(), cell.GridY())->setUnloadFlag(false);
|
||||
}
|
||||
LoadVMap(63-cell.GridX(),63-cell.GridY());
|
||||
//LoadVMap(63-cell.GridX(),63-cell.GridY());
|
||||
}
|
||||
|
||||
bool Map::Add(Player *player)
|
||||
|
||||
@@ -1767,6 +1767,9 @@ void Pet::LearnPetPassives()
|
||||
PetFamilySpellsStore::const_iterator petStore = sPetFamilySpellsStore.find(cFamily->ID);
|
||||
if(petStore != sPetFamilySpellsStore.end())
|
||||
{
|
||||
// For general hunter pets skill 270
|
||||
// Passive 01~10, Passive 00 (20782, not used), Ferocious Inspiration (34457)
|
||||
// Scale 01~03 (34902~34904, bonus from owner, not used)
|
||||
for(PetFamilySpellsSet::const_iterator petSet = petStore->second.begin(); petSet != petStore->second.end(); ++petSet)
|
||||
addSpell(*petSet, ACT_DECIDE, PETSPELL_NEW, 0xffff, PETSPELL_FAMILY);
|
||||
}
|
||||
|
||||
@@ -3469,7 +3469,7 @@ void Spell::EffectAddFarsight(uint32 i)
|
||||
CellPair pair = Trinity::ComputeCellPair(dynObj->GetPositionX(), dynObj->GetPositionY());
|
||||
Cell cell(pair);
|
||||
Map* map = dynObj->GetMap();
|
||||
map->LoadGrid(cell); // In case the spell is casted into a different grid by player
|
||||
map->EnsureGridLoadedForPlayer(cell, NULL, false); // In case the spell is casted into a different grid by player
|
||||
map->Add(dynObj);
|
||||
map->SwitchGridContainers(dynObj, true); // Needed for forwarding player packets
|
||||
dynObj->setActive(true); // Keep the grid updated even if there are no players in it
|
||||
|
||||
Reference in New Issue
Block a user