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

[svn] * Little fix in RandomMovementGenerator?
* Updated to 6731 and 680

Original author: Neo2003
Date: 2008-10-06 04:48:59-05:00

Files:
1 modified

Legend:

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

    r9 r18  
    5353#include "SocialMgr.h" 
    5454#include "Util.h" 
     55#include "TemporarySummon.h" 
     56 
    5557 
    5658pEffect SpellEffects[TOTAL_SPELL_EFFECTS]= 
     
    10071009                    return; 
    10081010                } 
     1011                case 37573:                                 //Temporal Phase Modulator 
     1012                { 
     1013                    if(!unitTarget) 
     1014                        return; 
     1015 
     1016                    TemporarySummon* tempSummon = dynamic_cast<TemporarySummon*>(unitTarget); 
     1017                    if(!tempSummon) 
     1018                        return; 
     1019 
     1020                    uint32 health = tempSummon->GetHealth(); 
     1021                    const uint32 entry_list[6] = {21821, 21820, 21817}; 
     1022 
     1023                    float x = tempSummon->GetPositionX(); 
     1024                    float y = tempSummon->GetPositionY(); 
     1025                    float z = tempSummon->GetPositionZ(); 
     1026                    float o = tempSummon->GetOrientation(); 
     1027 
     1028                    tempSummon->UnSummon(); 
     1029 
     1030                    Creature* pCreature = m_caster->SummonCreature(entry_list[urand(0, 2)], x, y, z, o,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,180000); 
     1031                    if (!pCreature) 
     1032                        return; 
     1033 
     1034                    pCreature->SetHealth(health); 
     1035 
     1036                    if(pCreature->AI()) 
     1037                        pCreature->AI()->AttackStart(m_caster); 
     1038 
     1039                    return; 
     1040                } 
     1041                case 34665:                                 //Administer Antidote 
     1042                { 
     1043                    if(!unitTarget || m_caster->GetTypeId() != TYPEID_PLAYER ) 
     1044                        return; 
     1045 
     1046                    if(!unitTarget) 
     1047                        return; 
     1048 
     1049                    TemporarySummon* tempSummon = dynamic_cast<TemporarySummon*>(unitTarget); 
     1050                    if(!tempSummon) 
     1051                        return; 
     1052 
     1053                    uint32 health = tempSummon->GetHealth(); 
     1054 
     1055                    float x = tempSummon->GetPositionX(); 
     1056                    float y = tempSummon->GetPositionY(); 
     1057                    float z = tempSummon->GetPositionZ(); 
     1058                    float o = tempSummon->GetOrientation(); 
     1059                    tempSummon->UnSummon(); 
     1060 
     1061                    Creature* pCreature = m_caster->SummonCreature(16992, x, y, z, o,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,180000); 
     1062                    if (!pCreature) 
     1063                        return; 
     1064 
     1065                    pCreature->SetHealth(health); 
     1066                    ((Player*)m_caster)->KilledMonster(16992,pCreature->GetGUID()); 
     1067 
     1068                    if (pCreature->AI()) 
     1069                        pCreature->AI()->AttackStart(m_caster); 
     1070 
     1071                    return; 
     1072                } 
     1073                case 44997:                                 // Converting Sentry 
     1074                { 
     1075                    //Converted Sentry Credit 
     1076                    m_caster->CastSpell(m_caster, 45009, true); 
     1077                    return; 
     1078                }                 
    10091079                case 45030:                                 // Impale Emissary 
    10101080                { 
    10111081                    // Emissary of Hate Credit 
    1012                     m_caster->CastSpell(m_caster,45088,true); 
     1082                    m_caster->CastSpell(m_caster, 45088, true); 
    10131083                    return; 
    10141084                } 
     
    11001170                            ((Player*)m_caster)->GetSession()->SendPacket(&data); 
    11011171                        } 
     1172                    } 
     1173                    return; 
     1174                } 
     1175                case 32826: 
     1176                { 
     1177                    if ( unitTarget && unitTarget->GetTypeId() == TYPEID_UNIT ) 
     1178                    { 
     1179                        //Polymorph Cast Visual Rank 1 
     1180                        const uint32 spell_list[6] = {32813, 32816, 32817, 32818, 32819, 32820}; 
     1181                        unitTarget->CastSpell( unitTarget, spell_list[urand(0, 5)], true);  
    11021182                    } 
    11031183                    return; 
     
    27612841            goInfo->type == GAMEOBJECT_TYPE_GOOBER && goInfo->goober.losOK ) 
    27622842        { 
    2763             if(BattleGround *bg = player->GetBattleGround())// in battleground 
    2764             { 
    2765                 if( !player->IsMounted() &&                 // not mounted 
    2766                     !player->HasStealthAura() &&            // not stealthed 
    2767                     !player->HasInvisibilityAura() &&       // not invisible 
    2768                     player->isAlive() )                     // live player 
    2769                 { 
    2770                     // check if it's correct bg 
    2771                     if(bg && bg->GetTypeID() == BATTLEGROUND_AB) 
    2772                         bg->EventPlayerClickedOnFlag(player, gameObjTarget); 
    2773  
    2774                     return; 
    2775                 } 
     2843            //isAllowUseBattleGroundObject() already called in CanCast() 
     2844            // in battleground check 
     2845            if(BattleGround *bg = player->GetBattleGround()) 
     2846            { 
     2847                // check if it's correct bg 
     2848                if(bg && bg->GetTypeID() == BATTLEGROUND_AB) 
     2849                    bg->EventPlayerClickedOnFlag(player, gameObjTarget); 
     2850                return; 
    27762851            } 
    27772852        } 
    27782853        else if (goInfo->type == GAMEOBJECT_TYPE_FLAGSTAND) 
    27792854        { 
     2855            //isAllowUseBattleGroundObject() already called in CanCast() 
     2856            // in battleground check 
    27802857            if(BattleGround *bg = player->GetBattleGround()) 
     2858            { 
    27812859                if(bg->GetTypeID() == BATTLEGROUND_EY) 
    27822860                    bg->EventPlayerClickedOnFlag(player, gameObjTarget); 
    2783             return; 
     2861                return; 
     2862            } 
    27842863        } 
    27852864        lockId = gameObjTarget->GetLockId(); 
     
    47524831            break; 
    47534832        } 
     4833        //5,000 Gold 
     4834        case 46642: 
     4835        { 
     4836            if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) 
     4837                return; 
     4838 
     4839            ((Player*)unitTarget)->ModifyMoney(50000000); 
     4840 
     4841            break; 
     4842        } 
    47544843    } 
    47554844