Ru-MaNGOS

Ru-MaNGOS (http://mangos.ytdb.ru/index.php)
-   Отвергнутые патчи (http://mangos.ytdb.ru/forumdisplay.php?f=50)
-   -   [11985][patch] Го тип 10 и gameobject_scripts (http://mangos.ytdb.ru/showthread.php?t=5096)

NeatElves 02.10.2011 14:21

[11985][patch] Го тип 10 и gameobject_scripts
 
Существуют го (интересны клетки(руда), для квестов по спасению(открытию)) двух типов - тип0 и тип10, если для первых поддержка gameobject_scripts есть в ядре, то для вторых - только event_scripts, патчик предлагает - если нет у го номера в data2 для евентскрипта(можно номер прописать - но будут говорить, мол не по кешу шаблон меняем) - обращаться в госкрипты.)

Код:

diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index caf7ce2..941a713 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -1117,6 +1117,9 @@ void GameObject::Use(Unit* user)
                    if (!sScriptMgr.OnProcessEvent(info->goober.eventId, player, this, true))
                        GetMap()->ScriptsStart(sEventScripts, info->goober.eventId, player, this);
                }
+                else
+                    // activate script
+                    GetMap()->ScriptsStart(sGameObjectScripts, GetGUIDLow(), spellCaster, this);
 
                // possible quest objective for active quests
                if (info->goober.questId && sObjectMgr.GetQuestTemplate(info->goober.questId))

Пример:
http://ru.wowhead.com/quest=12843
гуиды ЮТДБ


При юзе клетки с ключом - крик спасенного и киллкредит, клетка имеет автозакрытие

schmoozerd 19.11.2011 23:35

infact it might be an idea to allow db-scripts for _every_ type of GO
(if it is used in a bad way, then problem of the user)

at least this could be discussed.

I really don't like that the current gameobject_scripts system is based on gameobject guid, and not entry.
Probably it would be wise to change this asap (if possible)

schmoozerd 04.05.2012 21:41

Alternate version in [11985]
(support for go-scripts by entry)

Forward information: on UDB the scripts in go_scripts can be entirely moved to go_template_scripts.


Текущее время: 04:17. Часовой пояс GMT +3.

ru-mangos.ru - Русское сообщество MaNGOS