Changeset 186 for trunk/src/game/Map.cpp
- Timestamp:
- 11/19/08 13:44:25 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Map.cpp
r174 r186 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 91 91 if(vmgr->isMapLoadingEnabled()) 92 92 { 93 // x and y are swap ed !! => fixed now93 // x and y are swapped !! => fixed now 94 94 bool exists = vmgr->existsMap((sWorld.GetDataPath()+ "vmaps").c_str(), mapid, x,y); 95 95 if(!exists) … … 107 107 void Map::LoadVMap(int x,int y) 108 108 { 109 // x and y are swap ed !!109 // x and y are swapped !! 110 110 int vmapLoadResult = VMAP::VMapFactory::createOrGetVMapManager()->loadMap((sWorld.GetDataPath()+ "vmaps").c_str(), GetId(), x,y); 111 111 switch(vmapLoadResult) … … 145 145 } 146 146 147 //map already load, delete it before reloading (Is it nec cessary? Do we really need the abilty the reload maps during runtime?)147 //map already load, delete it before reloading (Is it necessary? Do we really need the ability the reload maps during runtime?) 148 148 if(GridMaps[x][y]) 149 149 { … … 335 335 void Map::DeleteFromWorld(T* obj) 336 336 { 337 // Note: In case resurrectable corpse and pet its removed from glo abal lists in own destructors337 // Note: In case resurrectable corpse and pet its removed from global lists in own destructor 338 338 delete obj; 339 339 } … … 442 442 bool Map::Add(Player *player) 443 443 { 444 player->SetInstanceId( this->GetInstanceId());444 player->SetInstanceId(GetInstanceId()); 445 445 446 446 // update player state for other player and visa-versa … … 671 671 672 672 obj->RemoveFromWorld(); 673 674 673 RemoveFromGrid(obj,grid,cell); 675 674 … … 1391 1390 break; 1392 1391 case TYPEID_UNIT: 1393 // in case trigg red sequence some spell can continue casting after prev CleanupsBeforeDelete call1392 // in case triggered sequence some spell can continue casting after prev CleanupsBeforeDelete call 1394 1393 // make sure that like sources auras/etc removed before destructor start 1395 1394 ((Creature*)obj)->CleanupsBeforeDelete (); … … 1470 1469 return false; 1471 1470 } 1472 1473 /*if(!player->isGameMaster() && i_data && i_data->IsEncounterInProgress())1474 {1475 sLog.outDebug("InstanceMap::CanEnter - Player '%s' can't enter instance '%s' while an encounter is in progress.", player->GetName(), GetMapName());1476 player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT);1477 return false;1478 }*/1479 1471 1480 1472 return Map::CanEnter(player); … … 1587 1579 void InstanceMap::Update(const uint32& t_diff) 1588 1580 { 1589 1590 1591 1592 1581 Map::Update(t_diff); 1582 1583 if(i_data) 1584 i_data->Update(t_diff); 1593 1585 } 1594 1586