Changeset 186 for trunk/src/game/Map.cpp

Show
Ignore:
Timestamp:
11/19/08 13:44:25 (17 years ago)
Author:
yumileroy
Message:

[svn] Remove isVisible function. Check stealth and invisible in canAttack();
Use new remove aura by interrupt flag function.

Original author: megamage
Date: 2008-11-07 09:36:46-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Map.cpp

    r174 r186  
    1111 * This program is distributed in the hope that it will be useful, 
    1212 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
     13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1414 * GNU General Public License for more details. 
    1515 * 
    1616 * You should have received a copy of the GNU General Public License 
    1717 * along with this program; if not, write to the Free Software 
    18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
     18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
    1919 */ 
    2020 
     
    9191        if(vmgr->isMapLoadingEnabled()) 
    9292        { 
    93                                                             // x and y are swaped !! => fixed now 
     93                                                            // x and y are swapped !! => fixed now 
    9494            bool exists = vmgr->existsMap((sWorld.GetDataPath()+ "vmaps").c_str(),  mapid, x,y); 
    9595            if(!exists) 
     
    107107void Map::LoadVMap(int x,int y) 
    108108{ 
    109                                                             // x and y are swaped !! 
     109                                                            // x and y are swapped !! 
    110110    int vmapLoadResult = VMAP::VMapFactory::createOrGetVMapManager()->loadMap((sWorld.GetDataPath()+ "vmaps").c_str(),  GetId(), x,y); 
    111111    switch(vmapLoadResult) 
     
    145145    } 
    146146 
    147     //map already load, delete it before reloading (Is it neccessary? 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?) 
    148148    if(GridMaps[x][y]) 
    149149    { 
     
    335335void Map::DeleteFromWorld(T* obj) 
    336336{ 
    337     // Note: In case resurrectable corpse and pet its removed from gloabal lists in own destructors 
     337    // Note: In case resurrectable corpse and pet its removed from global lists in own destructor 
    338338    delete obj; 
    339339} 
     
    442442bool Map::Add(Player *player) 
    443443{ 
    444     player->SetInstanceId(this->GetInstanceId()); 
     444    player->SetInstanceId(GetInstanceId()); 
    445445 
    446446    // update player state for other player and visa-versa 
     
    671671 
    672672    obj->RemoveFromWorld(); 
    673  
    674673    RemoveFromGrid(obj,grid,cell); 
    675674 
     
    13911390            break; 
    13921391        case TYPEID_UNIT: 
    1393             // in case triggred sequence some spell can continue casting after prev CleanupsBeforeDelete call 
     1392            // in case triggered sequence some spell can continue casting after prev CleanupsBeforeDelete call 
    13941393            // make sure that like sources auras/etc removed before destructor start 
    13951394            ((Creature*)obj)->CleanupsBeforeDelete (); 
     
    14701469        return false; 
    14711470    } 
    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     }*/ 
    14791471 
    14801472    return Map::CanEnter(player); 
     
    15871579void InstanceMap::Update(const uint32& t_diff) 
    15881580{ 
    1589         Map::Update(t_diff); 
    1590  
    1591         if(i_data) 
    1592                 i_data->Update(t_diff); 
     1581    Map::Update(t_diff); 
     1582 
     1583    if(i_data) 
     1584        i_data->Update(t_diff); 
    15931585} 
    15941586