| 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 | } |
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; |