Merhaba arkadaşlar,
Konuya öncelikle görsel ile başlayıp ne demek istediğimi anlatmak istedim. Yukarıdaki gibi görevlerin kategoriler şeklinde olmasını istiyorsanız aşağıdaki işlemleri yapmalısınız.
locale_game.txt açılır ve aşağıdaki satırlar eklenir.
İnterfaceModule.py e girerek aşağıdaki satırı bulup değiştirin.
Arayın
Değiştirin
UiCharacter.py açıp aşağıdakileri ekleyin.
ui.Button aşağıdakileri ekleyin.
Questlua_quest.cpp açılır ve eklenir.
Konuya öncelikle görsel ile başlayıp ne demek istediğimi anlatmak istedim. Yukarıdaki gibi görevlerin kategoriler şeklinde olmasını istiyorsanız aşağıdaki işlemleri yapmalısınız.
locale_game.txt açılır ve aşağıdaki satırlar eklenir.
Kod:
QUESTCATEGORY_0 Main Quests
QUESTCATEGORY_1 Sub Quests
QUESTCATEGORY_2 Collect Quests
QUESTCATEGORY_3 Levelup Quests
QUESTCATEGORY_4 Scroll Quests
QUESTCATEGORY_5 System Quests
İnterfaceModule.py e girerek aşağıdaki satırı bulup değiştirin.
Arayın
Kod:
self.BINARY_RecvQuest(index, name, "file", localeInfo.GetLetterImageName())
C++:
self.wndCharacter.questCategory.RecvQuest(self.BINARY_RecvQuest, index, name)
UiCharacter.py açıp aşağıdakileri ekleyin.
C++:
self.questShowingStartIndex
self.questScrollBar
self.questSlot
self.questNameList
self.questLastTimeList
self.questLastCountList
C++:
# Find these lines
self.soloEmotionSlot = self.GetChild("SoloEmotionSlot")
self.dualEmotionSlot = self.GetChild("DualEmotionSlot")
self.__SetEmotionSlot()
# And add the following
import uiQuestCategory
self.questCategory = uiQuestCategory.QuestCategoryWindow(self.pageDict["QUEST"])
# Find this
def OnUpdate(self):
self.__UpdateQuestClock()
# Replace it with
def OnUpdate(self):
self.questCategory.OnUpdate()
ui.Button aşağıdakileri ekleyin.
C++:
def SetTextAlignLeft(self, text, height = 4):
if not self.ButtonText:
textLine = TextLine()
textLine.SetParent(self)
textLine.SetPosition(27, self.GetHeight()/2)
textLine.SetVerticalAlignCenter()
textLine.SetHorizontalAlignLeft()
textLine.Show()
self.ButtonText = textLine
#Äù½ºÆ® ¸®½ºÆ® UI¿¡ ¸ÂÃç À§Ä¡ ÀâÀ½
self.ButtonText.SetText(text)
self.ButtonText.SetPosition(27, self.GetHeight()/2)
self.ButtonText.SetVerticalAlignCenter()
self.ButtonText.SetHorizontalAlignLeft()
Questlua_quest.cpp açılır ve eklenir.
C++:
int quest_get_current_quest_name(lua_State* L)
{
CQuestManager& q = CQuestManager::instance();
PC* pPC = q.GetCurrentPC();
lua_pushstring(L, pPC->GetCurrentQuestName().c_str());
return 1;
}
void RegisterQuestFunctionTable()
{
luaL_reg quest_functions[] =
{
{ "getcurrentquestname", quest_get_current_quest_name},
{ NULL, NULL }
};
CQuestManager::instance().AddLuaFunctionTable("q", quest_functions);
}