Changeset 233 for trunk/src/game/MiscHandler.cpp
- Timestamp:
- 11/19/08 13:49:07 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/MiscHandler.cpp
r232 r233 1392 1392 //recv_data.hexlike(); 1393 1393 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) 1398 1400 { 1399 1401 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()); 1404 1405 break; 1405 1406 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)); 1407 1413 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); 1409 1421 } 1410 1422