From f703449242949e387432bbc1b54a094f589f84ea Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 22 Mar 2009 11:44:07 -0600 Subject: *Backport a crash fix of petai. --HG-- branch : trunk --- src/game/PetAI.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp index 2ed3edb2df6..75c1aa06c20 100644 --- a/src/game/PetAI.cpp +++ b/src/game/PetAI.cpp @@ -123,6 +123,9 @@ void PetAI::UpdateAI(const uint32 diff) } } + if(!me->GetCharmInfo()) + return; + if (i_pet.GetGlobalCooldown() == 0 && !i_pet.hasUnitState(UNIT_STAT_CASTING)) { bool inCombat = me->getVictim(); -- cgit v1.2.3 From 380cffe5bf50e896699c502af9bcd8b70f34f412 Mon Sep 17 00:00:00 2001 From: raczman Date: Mon, 23 Mar 2009 18:07:58 +0100 Subject: Added script for GO 183146. By McBitter. --HG-- branch : trunk --- sql/updates/1247_world.sql | 1 + src/bindings/scripts/scripts/go/go_scripts.cpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 sql/updates/1247_world.sql (limited to 'src') diff --git a/sql/updates/1247_world.sql b/sql/updates/1247_world.sql new file mode 100644 index 00000000000..2e9a7088beb --- /dev/null +++ b/sql/updates/1247_world.sql @@ -0,0 +1 @@ +UPDATE `gameobject_template` SET `ScriptName` = 'go_jump_a_tron' WHERE `entry` = 183146; diff --git a/src/bindings/scripts/scripts/go/go_scripts.cpp b/src/bindings/scripts/scripts/go/go_scripts.cpp index 2a40a1352cb..9b775a3ef98 100644 --- a/src/bindings/scripts/scripts/go/go_scripts.cpp +++ b/src/bindings/scripts/scripts/go/go_scripts.cpp @@ -158,6 +158,18 @@ bool GOHello_go_teleporter(Player *player, GameObject* _GO) return false; } +/*##### +## go_jump_a_tron +######*/ + +bool GOHello_go_jump_a_tron(Player *player, GameObject* _GO) +{ + if (player->GetQuestStatus(10111) == QUEST_STATUS_INCOMPLETE) + player->CastSpell(player,33382,true); + + return true; +} + void AddSC_go_scripts() { Script *newscript; @@ -206,5 +218,10 @@ void AddSC_go_scripts() newscript->Name="go_teleporter"; newscript->pGOHello = &GOHello_go_teleporter; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="go_jump_a_tron"; + newscript->pGOHello = &GOHello_go_jump_a_tron; + newscript->RegisterSelf(); } -- cgit v1.2.3 From 71bcdec848661f93f34e958f535041964b6f01de Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 23 Mar 2009 15:25:20 -0600 Subject: *Fix a typo in knockback effect. --HG-- branch : trunk --- src/game/SpellEffects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 750130984eb..2df17636ad9 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -5720,7 +5720,7 @@ void Spell::EffectKnockBack(uint32 i) else { x = m_caster->GetPositionX(); - y = m_caster->GetPositionX(); + y = m_caster->GetPositionY(); } float dx = unitTarget->GetPositionX() - x; -- cgit v1.2.3 From 76f466cb3dc4e6fbe343b35e453c0d00c26c350a Mon Sep 17 00:00:00 2001 From: raczman Date: Tue, 24 Mar 2009 00:06:47 +0100 Subject: Added script for GO 184421 by Lukaasm. --HG-- branch : trunk --- sql/updates/1249_world.sql | 1 + src/bindings/scripts/scripts/go/go_scripts.cpp | 30 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 sql/updates/1249_world.sql (limited to 'src') diff --git a/sql/updates/1249_world.sql b/sql/updates/1249_world.sql new file mode 100644 index 00000000000..6ce0e777210 --- /dev/null +++ b/sql/updates/1249_world.sql @@ -0,0 +1 @@ +UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184421; diff --git a/src/bindings/scripts/scripts/go/go_scripts.cpp b/src/bindings/scripts/scripts/go/go_scripts.cpp index 9b775a3ef98..5c171b035b4 100644 --- a/src/bindings/scripts/scripts/go/go_scripts.cpp +++ b/src/bindings/scripts/scripts/go/go_scripts.cpp @@ -170,6 +170,30 @@ bool GOHello_go_jump_a_tron(Player *player, GameObject* _GO) return true; } +/*###### +## go_ethereum_prison +######*/ + +float ethereum_NPC[2][7] = +{ + {20785,20790,20789,20784,20786,20783,20788}, // hostile npc + {22810,22811,22812,22813,22814,22815,0} // fiendly npc (need script in acid ? only to cast spell reputation reward) +}; + +bool GOHello_go_ethereum_prison(Player *player, GameObject* _GO) +{ + _GO->SetGoState(0); + switch(rand()%2){ + case 0: + _GO->SummonCreature(ethereum_NPC[0][rand()%6],_GO->GetPositionX(),_GO->GetPositionY(),_GO->GetPositionZ()+0.3, 0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,10000); + break; + case 1: + _GO->SummonCreature(ethereum_NPC[1][rand()%5],_GO->GetPositionX(),_GO->GetPositionY(),_GO->GetPositionZ()+0.3, 0,TEMPSUMMON_TIMED_DESPAWN,10000); + break; +} +return true; +} + void AddSC_go_scripts() { Script *newscript; @@ -223,5 +247,11 @@ void AddSC_go_scripts() newscript->Name="go_jump_a_tron"; newscript->pGOHello = &GOHello_go_jump_a_tron; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="go_ethereum_prison"; + newscript->pGOHello = &GOHello_go_ethereum_prison; + newscript->RegisterSelf(); + } -- cgit v1.2.3