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

[svn] * Reimplemented packet/update forwarding in more generic way
* Implemented far sight spells (Far Sight, Eagle Eye, etc) at unlimited range and properly forward packets
* Implemented bind vision spells (Mind Vision, etc) to forward packets at unlimited distance
* Implemented Sentry Totem (both vision switching/forwarding and alerting)
* Other misc possession fixes
* Added .bindsight and .unbindsight commands

Please test out the above spells (including Mind Control) and report any issues on the forums.

Original author: gvcoman
Date: 2008-11-14 20:40:35-06:00

Files:
1 modified

Legend:

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

    r232 r233  
    13921392    //recv_data.hexlike(); 
    13931393 
    1394     uint8 unk; 
    1395     recv_data >> unk; 
    1396  
    1397     switch(unk) 
     1394    uint8 apply; 
     1395    recv_data >> apply; 
     1396 
     1397    CellPair pair; 
     1398 
     1399    switch(apply) 
    13981400    { 
    13991401        case 0: 
    1400             //WorldPacket data(SMSG_CLEAR_FAR_SIGHT_IMMEDIATE, 0) 
    1401             //SendPacket(&data); 
    1402             //_player->SetUInt64Value(PLAYER_FARSIGHT, 0); 
    1403             sLog.outDebug("Removed FarSight from player %u", _player->GetGUIDLow()); 
     1402            _player->SetFarsightVision(false); 
     1403            pair = Trinity::ComputeCellPair(_player->GetPositionX(), _player->GetPositionY()); 
     1404            sLog.outDebug("Player %u set vision to himself", _player->GetGUIDLow()); 
    14041405            break; 
    14051406        case 1: 
    1406             sLog.outDebug("Added FarSight " I64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow()); 
     1407            _player->SetFarsightVision(true); 
     1408            if (WorldObject* obj = _player->GetFarsightTarget()) 
     1409                pair = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY()); 
     1410            else 
     1411                return; 
     1412            sLog.outDebug("Player %u set vision to farsight target " I64FMTD ".", _player->GetGUIDLow(), _player->GetUInt64Value(PLAYER_FARSIGHT)); 
    14071413            break; 
    1408     } 
     1414        default: 
     1415            sLog.outDebug("Unhandled mode in CMSG_FAR_SIGHT: %u", apply); 
     1416            return; 
     1417    } 
     1418    // Update visibility after vision change 
     1419    Cell cell(pair); 
     1420    GetPlayer()->GetMap()->UpdateObjectsVisibilityFor(_player, cell, pair); 
    14091421} 
    14101422