Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Serverside common
- 1. Otwierasz item_lenght.h
- Szukasz:
- ITEM_BELT, //34 벨트
- Dodajesz pod tym:
- ITEM_NEW, //35
- 2. Otwierasz lenght.h
- Szukasz:
- WEAR_BELT, // 23 : 신규 벨트슬롯
- Dodajesz pod tym:
- WEAR_NEW = 27,
- #Serverside game
- 1. Otwierasz char_item.cpp
- Szukasz:
- case ITEM_BELT: // 신규 벨트 아이템
- Dodajesz pod tym:
- case ITEM_NEW:
- 2. Otwierasz item.cpp
- Szukasz funkcji:
- int CItem::FindEquipCell(LPCHARACTER ch, int iCandidateCell)
- Zaraz na początku znajdziesz taką linijke:
- if ((0 == GetWearFlag() || ITEM_TOTEM == GetType()) && ITEM_COSTUME != GetType() && ITEM_DS != GetType() && ITEM_SPECIAL_DS != GetType() && ITEM_RING != GetType() && ITEM_BELT != GetType())
- return -1;
- Dodajesz tam nasz nowy typ przedmiotu, by wyglądało to tak:
- if ((0 == GetWearFlag() || ITEM_TOTEM == GetType()) && ITEM_COSTUME != GetType() && ITEM_DS != GetType() && ITEM_SPECIAL_DS != GetType() && ITEM_RING != GetType() && ITEM_BELT != GetType() && ITEM_NEW != GetType())
- return -1;
- 3. Zjeżdzasz niżej w tej samej funkcji i szukasz:
- else if (GetType() == ITEM_BELT)
- return WEAR_BELT;
- I dodajesz pod tym:
- else if (GetType() == ITEM_NEW)
- return WEAR_NEW;
- 4. Szukasz funkcji:
- bool CItem::IsEquipable() const
- I dodajesz tam nasz nowy typ przedmiotu by wyglądało to tak:
- bool CItem::IsEquipable() const
- {
- switch (this->GetType())
- {
- case ITEM_COSTUME:
- case ITEM_ARMOR:
- case ITEM_WEAPON:
- case ITEM_ROD:
- case ITEM_PICK:
- case ITEM_UNIQUE:
- case ITEM_DS:
- case ITEM_SPECIAL_DS:
- case ITEM_RING:
- case ITEM_NEW: /// NASZ NOWY PRZEDMIOT JEST TUTAJ :)
- case ITEM_BELT:
- return true;
- }
- return false;
- }
- #Serverside db
- 1. Otwierasz ProtoReader.cpp
- Szukasz funkcji:
- int get_Item_Type_Value(string inputString)
- I dodajesz tam nasz nowy tym przedmiotu by wyglądało to tak:
- int get_Item_Type_Value(string inputString)
- {
- string arType[] = {"ITEM_NONE", "ITEM_WEAPON",
- "ITEM_ARMOR", "ITEM_USE",
- "ITEM_AUTOUSE", "ITEM_MATERIAL",
- "ITEM_SPECIAL", "ITEM_TOOL",
- "ITEM_LOTTERY", "ITEM_ELK", //10개
- "ITEM_METIN", "ITEM_CONTAINER",
- "ITEM_FISH", "ITEM_ROD",
- "ITEM_RESOURCE", "ITEM_CAMPFIRE",
- "ITEM_UNIQUE", "ITEM_SKILLBOOK",
- "ITEM_QUEST", "ITEM_POLYMORPH", //20개
- "ITEM_TREASURE_BOX", "ITEM_TREASURE_KEY",
- "ITEM_SKILLFORGET", "ITEM_GIFTBOX",
- "ITEM_PICK", "ITEM_HAIR",
- "ITEM_TOTEM", "ITEM_BLEND",
- "ITEM_COSTUME", "ITEM_DS", //30개
- "ITEM_SPECIAL_DS", "ITEM_EXTRACT",
- "ITEM_SECONDARY_COIN", //33개
- "ITEM_RING",
- "ITEM_BELT", //35개
- "ITEM_NEW", /// TUTAJ JEST NASZ NOWY TYP PRZEDMIOTU :)
- };
- #Clientside Userinterface
- 1. Otwierasz GameType.h
- Szukasz:
- const DWORD c_New_Equipment_Start = c_Equipment_Start + 32; //(LICZBA MOŻE BYĆ INNA)
- w zależności od tego jaką masz liczbę na końcu wersu, zwiększasz ją o 1, czyli jeżeli masz np 19 to zwiększasz do 20.
- Szukasz:
- const DWORD c_New_Equipment_Count = 5; // TO SAMO CO WYŻEJ, ZWIĘKSZASZ O 1
- Szukasz:
- const DWORD c_Equipment_Belt = c_New_Equipment_Start + 2;
- I dodajesz pod tym:
- const DWORD c_Equipment_New = c_New_Equipment_Start + 3;
- 2. Otwierasz PythonItemModule.cpp
- Szukasz:
- PyModule_AddIntConstant(poModule, "EQUIPMENT_BELT", c_Equipment_Belt);
- Dodajesz pod tym:
- PyModule_AddIntConstant(poModule, "EQUIPMENT_NEW", c_Equipment_New);
- Szukasz:
- PyModule_AddIntConstant(poModule, "ITEM_TYPE_BELT", CItemData::ITEM_TYPE_BELT);
- Dodajesz pod tym:
- PyModule_AddIntConstant(poModule, "ITEM_TYPE_NEW", CItemData::ITEM_TYPE_NEW);
- #Clientside Gamelib
- 1. Otwierasz ItemData.h
- Szukasz:
- ITEM_TYPE_BELT,
- Dodajesz pod tym:
- ITEM_TYPE_NEW,
- #Clientside locale/pl/ui/inventorywindow.py
- 1. Szukasz:
- {"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32},
- I dodajesz nowy slot na ten sam wzór w zależności gdzie chcesz, by przedmiot się zakładał.
- Ja przykładowo mam to ustawione tak:
- {"index":item.EQUIPMENT_NEW, "x":114, "y":106, "width":32, "height":32},
- I przedmiot będzie w tym przypadku zakładać się po prawej stronie ekwipunku (nad przyciskiem od smoczej alchemii)
- #Clientside ymir work/ui/equipment_bg_with_ring.dds albo equipment_bg_without_ring.dds w zależności który używasz
- W tym pliku dodajesz graficznie nowy slot (jego obrazek).
- #Clientside root/uitooltip.py
- Pod ifem
- elif item.ITEM_TYPE_RING == itemType:
- dodajemy
- elif item.ITEM_TYPE_NEW == itemType:
- self.__AppendLimitInformation()
- self.__AppendAffectInformation()
- self.__AppendAttributeInformation(attrSlot)
- bHasRealtimeFlag = 0
- for i in xrange(item.LIMIT_MAX_NUM):
- (limitType, limitValue) = item.GetLimit(i)
- if item.LIMIT_REAL_TIME == limitType:
- bHasRealtimeFlag = 1
- if 1 == bHasRealtimeFlag:
- self.AppendMallItemLastTime(metinSlot[0])
- ma wyglądać to tak:
- Dzięki temu nasz przedmiot będzie wyświetlał wszystkie bonusy i limity czasowe, poziomowe itd.
- Bonusy i limity oczywiście nadajemy w bazie tak jak w przypadku biżuterii czy pasów.
- Pamiętajcie, by edytować również plik dump_proto oraz skrypt sql > txt od item_proto, o ile z niego oczywiście korzystacie.
- Type przedmiotu w tym przypadku w bazie to będzie 36
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement