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

[svn] Merge branch r50 with trunk.

Original author: megamage
Date: 2008-10-17 21:44:37-05:00

Files:
1 modified

Legend:

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

    r44 r53  
    19201920            break; 
    19211921        } 
    1922         case TARGET_BEHIND_VICTIM: 
    1923         { 
    1924             // Get selected target for player (or victim for units) 
    1925             Unit *pTarget = NULL; 
    1926             if(m_caster->GetTypeId() == TYPEID_PLAYER) 
    1927                 pTarget = ObjectAccessor::GetUnit(*m_caster, ((Player*)m_caster)->GetSelection()); 
    1928             else 
    1929                 pTarget = m_caster->getVictim(); 
    1930             // No target present - return 
    1931             if (!pTarget) 
    1932                 return; 
    1933             // Init dest coordinates 
    1934             uint32 mapid = m_caster->GetMapId(); 
    1935             float x = m_targets.m_destX; 
    1936             float y = m_targets.m_destY; 
    1937             float z = m_targets.m_destZ; 
    1938             float orientation = pTarget->GetOrientation(); 
    1939             // Teleport 
    1940             if(unitTarget->GetTypeId() == TYPEID_PLAYER) 
    1941                 ((Player*)unitTarget)->TeleportTo(mapid, x, y, z, orientation, TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (unitTarget==m_caster ? TELE_TO_SPELL : 0)); 
    1942             else 
    1943             { 
    1944                 MapManager::Instance().GetMap(mapid, m_caster)->CreatureRelocation((Creature*)unitTarget, x, y, z, orientation); 
    1945                 WorldPacket data; 
    1946                 unitTarget->BuildTeleportAckMsg(&data, x, y, z, orientation); 
    1947                 unitTarget->SendMessageToSet(&data, false); 
    1948             } 
    1949             return; 
    1950         } 
    19511922        default: 
    19521923        {