- 0
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Activity
-
36
Destroy Item System
This fixes several issues : Unable to destroy an item from the Dragon Soul Inventory A second dialog box appears asking for confirmation before destroying the item When you give yourself any stackable item and split the stack, you can drop the splitted stack in correct amounts, but you cannot destroy a splitted stack, you will always be forced to destroy the whole stack Client/Local_inc.h Add : #define M2_FEATURE_DESTROY_ITEM Client/Packet.h Add : #ifdef M2_FEATURE_DESTROY_ITEM HEADER_CG_ITEM_DESTROY = 21, #endif Add : #ifdef M2_FEATURE_DESTROY_ITEM typedef struct command_item_destroy { BYTE header; TItemPos pos; BYTE count; } TPacketCGItemDestroy; #endif Client/PythonApplicationModule.cpp Add : #ifdef M2_FEATURE_DESTROY_ITEM PyModule_AddIntConstant(poModule, "M2_FEATURE_DESTROY_ITEM", 1); #else PyModule_AddIntConstant(poModule, "M2_FEATURE_DESTROY_ITEM", 0); #endif Client/PythonNetworkStream.h Add : #ifdef M2_FEATURE_DESTROY_ITEM bool SendItemDestroyPacket(TItemPos pos, DWORD count); #endif Client/PythonNetworkStramModule.cpp Add : #ifdef M2_FEATURE_DESTROY_ITEM PyObject* netSendItemDestroyPacket(PyObject* poSelf, PyObject* poArgs) { TItemPos Cell; int count; switch (PyTuple_Size(poArgs)) { case 2: if (!PyTuple_GetInteger(poArgs, 0, &Cell.cell)) return Py_BuildException(); if (!PyTuple_GetInteger(poArgs, 1, &count)) return Py_BuildException(); break; case 3: if (!PyTuple_GetByte(poArgs, 0, &Cell.window_type)) return Py_BuildException(); if (!PyTuple_GetInteger(poArgs, 1, &Cell.cell)) return Py_BuildException(); if (!PyTuple_GetInteger(poArgs, 2, &count)) return Py_BuildException(); break; default: return Py_BuildException(); } CPythonNetworkStream& rkNetStream = CPythonNetworkStream::Instance(); rkNetStream.SendItemDestroyPacket(Cell, count); return Py_BuildNone(); } #endif Add : #ifdef M2_FEATURE_DESTROY_ITEM { "SendItemDestroyPacket", netSendItemDestroyPacket, METH_VARARGS }, #endif Client/PythonNetworkStreamPhaseGameItem.cpp Add : #ifdef M2_FEATURE_DESTROY_ITEM bool CPythonNetworkStream::SendItemDestroyPacket(TItemPos pos, DWORD count) { if (!__CanActMainInstance()) return true; TPacketCGItemDestroy itemDestroyPacket; itemDestroyPacket.header = HEADER_CG_ITEM_DESTROY; itemDestroyPacket.pos = pos; itemDestroyPacket.count = count; if (!Send(sizeof(itemDestroyPacket), &itemDestroyPacket)) { Tracen("SendItemDestroyPacket Error"); return false; } return SendSequence(); } #endif Server/service.h Add : #define M2_FEATURE_DESTROY_ITEM Server/char_item.cpp Add : #ifdef M2_FEATURE_DESTROY_ITEM bool CHARACTER::DestroyItem(TItemPos Cell, BYTE bCount) { LPITEM item = NULL; if (!CanHandleItem()) { if (NULL != DragonSoul_RefineWindow_GetOpener()) ChatPacket(CHAT_TYPE_INFO, LC_TEXT("°*È*âÀ» ¿¬ »óÅ¿¡¼*´Â ¾ÆÀÌÅÛÀ» ¿Å±æ ¼ö ¾ø½À´Ï´Ù.")); return false; } if (IsDead()) return false; if (!IsValidItemPosition(Cell) || !(item = GetItem(Cell))) return false; if (item->IsExchanging()) return false; if (true == item->isLocked()) return false; if (quest::CQuestManager::instance().GetPCForce(GetPlayerID())->IsRunning() == true) return false; if (item->GetCount() <= 0) return false; if (bCount == 0 || bCount > item->GetCount()) bCount = item->GetCount(); SyncQuickslot(QUICKSLOT_TYPE_ITEM, Cell.cell, 255); if (bCount == item->GetCount()) { item->RemoveFromCharacter(); } else { if (bCount == 0) { if (test_server) sys_log(0, "[DROP_ITEM] drop item count == 0"); return false; } item->SetCount(item->GetCount() - bCount); ITEM_MANAGER::instance().FlushDelayedSave(item); } ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You destroyed: %d x %s."), bCount, item->GetName()); return true; } #endif Server/input.h Add : #ifdef M2_FEATURE_DESTROY_ITEM void ItemDestroy(LPCHARACTER ch, const char* data); #endif Server/char.h Add : #ifdef M2_FEATURE_DESTROY_ITEM bool DestroyItem(TItemPos Cell, BYTE bCount = 0); #endif Server/input_main.cpp Add : #ifdef M2_FEATURE_DESTROY_ITEM case HEADER_CG_ITEM_DESTROY: if (!ch->IsObserverMode()) ItemDestroy(ch, c_pData); break; #endif Add : #ifdef M2_FEATURE_DESTROY_ITEM void CInputMain::ItemDestroy(LPCHARACTER ch, const char* data) { struct command_item_destroy* pinfo = (struct command_item_destroy*)data; if (ch) ch->DestroyItem(pinfo->Cell, pinfo->count); } #endif Server/packet.h Add : #ifdef M2_FEATURE_DESTROY_ITEM HEADER_CG_ITEM_DESTROY = 21, #endif Add : #ifdef M2_FEATURE_DESTROY_ITEM typedef struct command_item_destroy { BYTE header; TItemPos Cell; BYTE count; } TPacketCGItemDestroy; #endif Server/packet_info.cpp Add : #ifdef M2_FEATURE_DESTROY_ITEM Set(HEADER_CG_ITEM_DESTROY, sizeof(TPacketCGItemDestroy), "ItemDestroy", true); #endif Client/game.py Add : if app.M2_FEATURE_DESTROY_ITEM: def __SendDestroyItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY): if uiPrivateShopBuilder.IsBuildingPrivateShop(): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP) return net.SendItemDestroyPacket(itemInvenType, itemVNum, itemCount) return Add : if app.M2_FEATURE_DESTROY_ITEM: def RequestDestroyItem(self, answer): if not self.itemDropQuestionDialog: return if answer: ## Question Text questionText = "Are you really sure?" ## Dialog itemDropQuestionDialog2 = uiCommon.QuestionDialog() itemDropQuestionDialog2.SetText(questionText) itemDropQuestionDialog2.SetAcceptEvent(lambda arg=True: self.RequestDestroyItemConfirm(arg)) itemDropQuestionDialog2.SetCancelEvent(lambda arg=False: self.RequestDestroyItemConfirm(arg)) itemDropQuestionDialog2.Open() itemDropQuestionDialog2.dropType = self.itemDropQuestionDialog.dropType itemDropQuestionDialog2.dropNumber = self.itemDropQuestionDialog.dropNumber itemDropQuestionDialog2.dropCount = self.itemDropQuestionDialog.dropCount self.itemDropQuestionDialog2 = itemDropQuestionDialog2 self.itemDropQuestionDialog.Close() self.itemDropQuestionDialog = None constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0) def RequestDestroyItemConfirm(self, answer): if not self.itemDropQuestionDialog2: return if answer: dropType = self.itemDropQuestionDialog2.dropType dropNumber = self.itemDropQuestionDialog2.dropNumber dropCount = self.itemDropQuestionDialog2.dropCount if player.SLOT_TYPE_INVENTORY == dropType: if dropNumber == player.ITEM_MONEY: return else: self.__SendDestroyItemPacket(dropNumber, dropCount) elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType: self.__SendDestroyItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY) self.itemDropQuestionDialog2.Close() self.itemDropQuestionDialog2 = None constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0) Full __DropItem : def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount): # PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지 if uiPrivateShopBuilder.IsBuildingPrivateShop(): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP) return # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP if player.SLOT_TYPE_INVENTORY == attachedType and player.IsEquipmentSlot(attachedItemSlotPos): self.stream.popupWindow.Close() self.stream.popupWindow.Open(localeInfo.DROP_ITEM_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK) else: if player.SLOT_TYPE_INVENTORY == attachedType: dropItemIndex = player.GetItemIndex(attachedItemSlotPos) item.SelectItem(dropItemIndex) dropItemName = item.GetItemName() ## Question Text questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount) ## Dialog if app.M2_FEATURE_DESTROY_ITEM: itemDropQuestionDialog = uiCommon.QuestionDialogItem() else: itemDropQuestionDialog = uiCommon.QuestionDialog() itemDropQuestionDialog.SetText(questionText) itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg)) if app.M2_FEATURE_DESTROY_ITEM: itemDropQuestionDialog.SetDestroyEvent(lambda arg=TRUE: self.RequestDestroyItem(arg)) itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg)) itemDropQuestionDialog.Open() itemDropQuestionDialog.dropType = attachedType itemDropQuestionDialog.dropNumber = attachedItemSlotPos itemDropQuestionDialog.dropCount = attachedItemCount self.itemDropQuestionDialog = itemDropQuestionDialog constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1) elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType: dropItemIndex = player.GetItemIndex(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos) item.SelectItem(dropItemIndex) dropItemName = item.GetItemName() ## Question Text questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount) ## Dialog if app.M2_FEATURE_DESTROY_ITEM: itemDropQuestionDialog = uiCommon.QuestionDialogItem() else: itemDropQuestionDialog = uiCommon.QuestionDialog() itemDropQuestionDialog.SetText(questionText) itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg)) if app.M2_FEATURE_DESTROY_ITEM: itemDropQuestionDialog.SetDestroyEvent(lambda arg=TRUE: self.RequestDestroyItem(arg)) itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg)) itemDropQuestionDialog.Open() itemDropQuestionDialog.dropType = attachedType itemDropQuestionDialog.dropNumber = attachedItemSlotPos itemDropQuestionDialog.dropCount = attachedItemCount self.itemDropQuestionDialog = itemDropQuestionDialog constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)- 1
-
-
-
1
-
0
Fusion.org is Looking for Staff Members
Fusion.org is Looking for Staff Members Fusion.org currently looking for STAFF for the following functions: Game Developer: to help us improve our systems/create new ones and to help us solving in-game bugs; Trial Game Master (TGM): Game Master in the training phase, however, this does not mean he does not have authority in the game, since he has the same functions and responsibilities as a full GM; Newtwork Manager (NH): Person who is in charge of all the management of the web page and that the connections are working correctly, solves doubts about the state of the server among others; Social Manager: We are looking for someone who knows how to use Photoshop and who knows how to do Video Editing for future events; If you are interested, please send a message to: Discord: [ADM]RolysTone#0568 Facebook: https://www.facebook.com/RolysTone1992/ -
1
Brillances
Hello, I would like to know how I can solve the problem that the game has with the shine on weapons/armor, since I tried another client and it does not have that problem, but I do not know which file I have to change. It looks like this exaggeratedly shiny: And I want it to look something like this, only it has glitter on the parts of the weapon/armor where it has glitter and not on the entire character. The result I'm looking for would be something like this: Greetings and thanks in advance! -
3
ELONIA2 | PVM-MEDIUM | 11 LANGUAGES | INTERNATIONAL | A NEW STORY
I have known this project for a very long time, I recommend this server because it has been involved for a long time and a lot of work. Good luck with the server! -
27
-
4
Spider Queen not spawining in spider dungeon v1
g 385 387 1 1 0 0 15400s 100 1 2019 `g` means I'm spawning the vnum of a group, not a monster. So in this case I'm calling the vnum of the group associated with the Spider Queen. `385` `387` are the local spawn coordinates of the group. `1` `1` are the random values for the local spawn coordinates. `0` is the Z section, you don't care about that. the other `0` is the direction, since this is not an NPC, you don't care about this either. `15400` is the number of seconds in between respawns since server start time. Change it as you like. `100` is the spawn chance per tick. `1` is the number of groups to spawn per tick. and finally, `2019` is the vnum of the monster, or in this case the group, to spawn. -
949
-
Question
peakzinho 13
Can help?
https://gyazo.com/84916472db76ae29ac18f842a91878ed
Link to comment
Share on other sites
Top Posters For This Question
2
1
Popular Days
Feb 3
2
Feb 2
1
Top Posters For This Question
peakzinho 2 posts
edwardcrkz 1 post
Popular Days
Feb 3 2021
2 posts
Feb 2 2021
1 post
Popular Posts
peakzinho
Can help? https://gyazo.com/84916472db76ae29ac18f842a91878ed
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now