Сделать стартовой Среда, 24 Апреля 2024, 10:26 Приветствую Вас Гость
Главная | Регистрация | Вход | RSS
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Форум » MANGOS » Фиксы » Скрипты на опасные вещи ([Patch])
Скрипты на опасные вещи
SANEYДата: Понедельник, 04 Мая 2009, 03:44 | Сообщение # 1
Лутший из лутших
Группа: Администраторы
Сообщений: 142
Репутация: 43
Статус: Offline
Items:
http://www.wowhead.com/?item=42624
http://www.wowhead.com/?item=36847
http://www.wowhead.com/?item=36835
http://www.wowhead.com/?item=36827
http://www.wowhead.com/?item=44222
http://www.wowhead.com/?item=34979

Quests:
In Service of Blood http://www.wowhead.com/?quest=12125
In Service of Frost http://www.wowhead.com/?quest=12127
In Service of the Unholy http://www.wowhead.com/?quest=12126

Code
-- Gem's
UPDATE item_template SET ScriptName='item_frost_gem' WHERE entry=36847;
UPDATE item_template SET ScriptName='item_unholy_gem' WHERE entry=36835;
UPDATE item_template SET ScriptName='item_blood_gem' WHERE entry=36827;
-- Battered Storm Hammer
UPDATE item_template SET ScriptName='item_battered_storm_hammer' WHERE entry=42624;
-- Dart Gun
UPDATE item_template SET ScriptName='item_dart_gun' WHERE entry=44222;
-- Pouch of Crushed Bloodspore
UPDATE item_template SET ScriptName='item_pouch_crushed_bloodspore' WHERE entry=34979;

Code
--- scripts/item/item_scripts.cpp       2009-04-22 23:56:23.000000000 +0300
+++ scripts/item/item_scripts.cpp       2009-04-23 19:26:43.000000000 +0300
@@ -441,6 +441,93 @@
      return true;
  }
   
+/*#####
+# item_42624 (Battered Storm Hammer)
+#####*/
+
+bool ItemUse_item_battered_storm_hammer(Player *player, Item* _Item, SpellCastTargets const& targets)
+{
+    if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
+        targets.getUnitTarget()->GetEntry() == 30142 ) //Iron Watcher
+        return false;
+                         
+      player->SendEquipError(EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM,_Item,NULL);
+        return true;
+}
+
+/*#####
+# item_36827 (Blood Gem)
+#####*/
+
+bool ItemUse_item_blood_gem(Player *player, Item* _Item, SpellCastTargets const& targets)
+{
+    if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
+        targets.getUnitTarget()->GetEntry() == 26411 ) //Deranged Indu'le Villager
+        return false;
+                         
+      player->SendEquipError(EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM,_Item,NULL);
+        return true;
+}
+
+/*#####
+# item_36835 (Unholy Gem)
+#####*/
+
+bool ItemUse_item_unholy_gem(Player *player, Item* _Item, SpellCastTargets const& targets)
+{
+    if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
+        targets.getUnitTarget()->GetEntry() == 26926 ) //Duke Vallenhal
+        return false;
+                         
+      player->SendEquipError(EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM,_Item,NULL);
+        return true;
+}
+
+/*#####
+# item_36847 (Frost Gem)
+#####*/
+
+bool ItemUse_item_frost_gem(Player *player, Item* _Item, SpellCastTargets const& targets)
+{
+    if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
+        targets.getUnitTarget()->GetEntry() == 26283 ) //Ice Revenant
+        return false;
+                         
+      player->SendEquipError(EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM,_Item,NULL);
+        return true;
+}
+
+/*#####
+# item_44222 (Dart Gun)
+#####*/
+
+bool ItemUse_item_dart_gun(Player *player, Item* _Item, SpellCastTargets const& targets)
+{
+    if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
+        targets.getUnitTarget()->GetEntry() == 32201 ) //Orgrim's Hammer Scout
+        return false;
+                         
+      player->SendEquipError(EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM,_Item,NULL);
+        return true;
+}
+
+/*#####
+# item_34979 (Pouch of Crushed Bloodspore)
+#####*/
+
+bool ItemUse_item_pouch_crushed_bloodspore(Player *player, Item* _Item, SpellCastTargets const& targets)
+{
+    if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
+        ( (targets.getUnitTarget()->GetEntry() == 25789 ) || //Gammothra the Tormentor
+          (targets.getUnitTarget()->GetEntry() == 24469 ) //Magnataur Huntress <Mate of Gammothra>
+        ) )  
+        return false;
+                         
+      player->SendEquipError(EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM,_Item,NULL);
+        return true;
+}
+
+
  void AddSC_item_scripts()
  {
      Script *newscript;
@@ -539,4 +626,34 @@
      newscript->Name = "item_zezzaks_shard";
      newscript->pItemUse = &ItemUse_item_zezzak_shard;
      newscript->RegisterSelf();
+     
+    newscript = new Script;
+    newscript->Name = "item_battered_storm_hammer";
+    newscript->pItemUse = &ItemUse_item_battered_storm_hammer;
+    newscript->RegisterSelf();
+     
+    newscript = new Script;
+    newscript->Name = "item_blood_gem";
+    newscript->pItemUse = &ItemUse_item_blood_gem;
+    newscript->RegisterSelf();
+     
+    newscript = new Script;
+    newscript->Name = "item_unholy_gem";
+    newscript->pItemUse = &ItemUse_item_unholy_gem;
+    newscript->RegisterSelf();
+     
+    newscript = new Script;
+    newscript->Name = "item_frost_gem";
+    newscript->pItemUse = &ItemUse_item_frost_gem;
+    newscript->RegisterSelf();
+     
+    newscript = new Script;
+    newscript->Name = "item_dart_gun";
+    newscript->pItemUse = &ItemUse_item_dart_gun;
+    newscript->RegisterSelf();
+
+    newscript = new Script;
+    newscript->Name = "item_pouch_crushed_bloodspore";
+    newscript->pItemUse = &ItemUse_item_pouch_crushed_bloodspore;
+    newscript->RegisterSelf();
  }
 
Форум » MANGOS » Фиксы » Скрипты на опасные вещи ([Patch])
  • Страница 1 из 1
  • 1
Поиск:

Copyright WoW Portal © 2009 | Сайт создан в системе uCoz