- Mesaj
- 805
- Çözümler
- 41
- Beğeni
- 2.273
- Puan
- 1.679
- Ticaret Puanı
- 0
Herkese merhaba burada anlatımını yapacağım konu şaman tarafından alınan kutsamaların ekranın sol üst kısmından tıklama ile kaldırılmasıdır.
Source:
Server:
game:
common:
Client:
UserInterface:
Client:
root:
locale:
Anlamayan arkadaşlar için (anlatım):
Source:
Server:
game:
cmd_general.cpp:
//add:
#ifdef ENABLE_AFFECT_BUFF_REMOVE
ACMD(do_remove_buff)
{
char arg1[256];
one_argument(argument, arg1, sizeof(arg1));
if (!*arg1)
return;
if (!ch)
return;
int affect = 0;
str_to_number(affect, arg1);
CAffect* pAffect = ch->FindAffect(affect);
if (pAffect)
ch->RemoveAffect(affect);
}
#endif
cmd.cpp:
//search:
struct command_info cmd_info[] =
//add before:
#ifdef ENABLE_AFFECT_BUFF_REMOVE
ACMD(do_remove_buff);
#endif
//search:
{ "\n", NULL, 0, POS_DEAD, GM_IMPLEMENTATOR }
//add before:
#ifdef ENABLE_AFFECT_BUFF_REMOVE
{ "remove_buff", do_remove_buff, 0, POS_DEAD, GM_IMPLEMENTATOR },
#endif
common:
service.h:
#define ENABLE_AFFECT_BUFF_REMOVE
Client:
UserInterface:
PythonApplicationModule.cpp:
//search:
#ifdef ENABLE_COSTUME_SYSTEM
PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM", 1);
#else
PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM", 0);
#endif
//add:
#ifdef ENABLE_AFFECT_BUFF_REMOVE
PyModule_AddIntConstant(poModule, "ENABLE_AFFECT_BUFF_REMOVE", 1);
#else
PyModule_AddIntConstant(poModule, "ENABLE_AFFECT_BUFF_REMOVE", 0);
#endif
Locale_inc.h:
#define ENABLE_AFFECT_BUFF_REMOVE
Client:
root:
uiaffectshower.py:
#search def __init__(self)::
self.isClocked = True
#add:
if app.ENABLE_AFFECT_BUFF_REMOVE:
self.buffQuestionDialog = None
self.skillIndex = None
#search:
def SetSkillAffectFlag(self, flag):
self.isSkillAffect = flag
#add:
if app.ENABLE_AFFECT_BUFF_REMOVE:
def SetSkillIndex(self, skillIndex):
self.skillIndex = skillIndex
#search:
def OnMouseOverIn(self):
#add before:
if app.ENABLE_AFFECT_BUFF_REMOVE:
def OnBuffQuestionDialog(self, skillIndex):
self.buffQuestionDialog = uiCommon.QuestionDialog()
self.buffQuestionDialog.SetWidth(350)
self.buffQuestionDialog.SetText(localeInfo.BUFF_AFFECT_REMOVE_QUESTION % (skill.GetSkillName(skillIndex)))
self.buffQuestionDialog.SetAcceptEvent(lambda arg = skillIndex: self.OnCloseBuffQuestionDialog(arg))
self.buffQuestionDialog.SetCancelEvent(lambda arg = 0: self.OnCloseBuffQuestionDialog(arg))
self.buffQuestionDialog.Open()
def OnCloseBuffQuestionDialog(self, answer):
if not self.buffQuestionDialog:
return
self.buffQuestionDialog.Close()
self.buffQuestionDialog = None
if not answer:
return
net.SendChatPacket("/remove_buff %d" % answer)
return TRUE
#search:
def OnMouseOverIn(self):
if self.toolTipText:
self.toolTipText.Show()
#add:
if app.ENABLE_AFFECT_BUFF_REMOVE:
if self.skillIndex:
self.OnBuffQuestionDialog(self.skillIndex)
#search:
image.SetSkillAffectFlag(TRUE)
image.SetDescription(name)
#add:
if app.ENABLE_AFFECT_BUFF_REMOVE:
image.SetSkillIndex(skillIndex)
locale:
locale_game.txt:
BUFF_AFFECT_REMOVE_QUESTION Are you sure you want to remove %s?
Anlamayan arkadaşlar için (anlatım):
Linkleri görebilmek için
giriş yap veya kayıt ol.