Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 18:14

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[HELP] How to remove WIKICI?

Discussion on [HELP] How to remove WIKICI? within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2012
Posts: 34
Received Thanks: 0
[HELP] How to remove WIKICI?

I realized that in this code when I click shift on the item it appears the message to create, I would like to remove this for everyone on the server to be able to use, anyone help?



WndWiki.cpp:
Code:
#include "stdafx.h"

#ifdef __WIKI
#include "WndWiki.h"
#include "resdata.h"

#include "DPClient.h"

#ifdef __MODEL_VIEW
#include "WndModelView.h"
#endif

extern CDPClient g_DPlay;

DWORD WINAPI __SortThread(LPVOID lpParam)
{
	CWndWiki *pWiki = (CWndWiki*)lpParam;
	pWiki->Sort();
	return 0;
}

CWndWiki::CWndWiki()
{
	m_vecItems.clear();
	m_bUpperCase = false;
	m_cSortType = 0;
	m_hSortThread = INVALID_HANDLE_VALUE;
	m_pCreate = NULL;
}

CWndWiki::~CWndWiki()
{
	m_vecItems.clear();
	TerminateThread(m_hSortThread,0);
	SAFE_DELETE(m_pCreate);
}

BOOL CWndWiki::Initialize(CWndBase *pWndParent, DWORD dwStyle)
{
	return CWndNeuz::InitDialog(g_Neuz.GetSafeHwnd(),APP_WIKI,0,0,pWndParent);
}

void CWndWiki::OnInitialUpdate()
{
	CWndNeuz::OnInitialUpdate();

	m_pListItems = (CWndListBox*)GetDlgItem(WIDC_LISTBOX1);
	m_pComboKind = (CWndComboBox*)GetDlgItem(WIDC_COMBOBOX1);
	m_pComboJob = (CWndComboBox*)GetDlgItem(WIDC_COMBOBOX2);
	m_pEditFilter = (CWndEdit*)GetDlgItem(WIDC_EDIT1);
	
	int nIdx = 0;
	for( int i = 0; i < MAX_JOB; ++i )
	{
		if( i == JOB_PUPPETEER || i == JOB_DOPPLER || i == JOB_GATEKEEPER )
			continue;
		nIdx = m_pComboJob->AddString(prj.m_aJob[i].szName);
		m_pComboJob->SetItemData(nIdx,i);
	}
	m_pComboJob->SetCurSel(0);

	nIdx = m_pComboKind->AddString("All");
	m_pComboKind->SetItemData(nIdx,NULL_ID);

	nIdx = m_pComboKind->AddString("Weapon");
	m_pComboKind->SetItemData(nIdx,IK1_WEAPON);

	nIdx = m_pComboKind->AddString("Armor");
	m_pComboKind->SetItemData(nIdx,IK1_ARMOR);

	nIdx = m_pComboKind->AddString("Ride");
	m_pComboKind->SetItemData(nIdx,IK1_RIDE);

	nIdx = m_pComboKind->AddString("Furniture");
	m_pComboKind->SetItemData(nIdx,IK1_HOUSING);

	m_pComboKind->SetCurSel(0);

	UpdateList();

	MoveParentCenter();
}

BOOL CWndWiki::OnChildNotify(UINT message, UINT nID, LRESULT *pLResult)
{
	if( message == WNM_CLICKED )
	{
		switch( nID )
		{
		case WIDC_BUTTON2:
			{
				TerminateThread(m_hSortThread,0);
				m_cSortType = 0;
				m_bUpperCase = !m_bUpperCase;
				m_hSortThread = CreateThread(0,0,__SortThread,this,0,0);
			}
			break;
		case WIDC_BUTTON3:
			{
				TerminateThread(m_hSortThread,0);
				m_cSortType = 1;
				m_bUpperCase = !m_bUpperCase;
				m_hSortThread = CreateThread(0,0,__SortThread,this,0,0);
			}
			break;
		case WIDC_BUTTON4:
			{
				TerminateThread(m_hSortThread,0);
				m_cSortType = 2;
				m_bUpperCase = !m_bUpperCase;
				m_hSortThread = CreateThread(0,0,__SortThread,this,0,0);
			}
			break;
		case WIDC_BUTTON1:
			{
				UpdateList();
			}
			break;
		}
	}
	else if( message == WNM_SELCHANGE )
	{
		if( nID == WIDC_COMBOBOX1 || nID == WIDC_COMBOBOX2 )
			UpdateList();
	}
	else if( message == EN_CHANGE )
	{
		if( nID == WIDC_EDIT1 )
			UpdateList();
	}
	else if( message == WNM_DBLCLK )
	{
		if( nID == WIDC_LISTBOX1 )
		{
#ifdef __MODEL_VIEW
			if( m_pListItems->GetCurSel() != -1 )
			{
				if( g_pPlayer->m_dwAuthorization >= AUTH_ADMINISTRATOR && GetAsyncKeyState(VK_SHIFT) & 0x8000 )
				{
					SAFE_DELETE(m_pCreate);
					m_pCreate = new CWndWikiCreate();
					m_pCreate->Initialize(this);
					m_pCreate->SetItem(m_vecItems[m_pListItems->GetCurSel()]);
				}else
				{
					ItemProp *pProp = m_vecItems[m_pListItems->GetCurSel()];
					if( pProp )
					{
						CWndModelView *pWndViewer = (CWndModelView*)g_WndMng.GetApplet(APP_MODEL_VIEW);
						if( !pWndViewer )
						{
							pWndViewer = (CWndModelView*)g_WndMng.CreateApplet(APP_MODEL_VIEW);
							if( pWndViewer )
							{
								if( !pWndViewer->SetPart(pProp) )
									pWndViewer->Destroy();
							}
						}else
							pWndViewer->SetPart(pProp);
					}
				}
			}
#endif
		}
	}
	return CWndNeuz::OnChildNotify(message,nID,pLResult);
}


void CWndWiki::UpdateList()
{
	const static DWORD dwItems [] = { II_SYS_SYS_SCR_PERIN };
	DWORD dwJob = m_pComboJob->GetSelectedItemData();
	DWORD dwFilter = m_pComboKind->GetSelectedItemData();
	CString strFilter = m_pEditFilter->GetString();

	m_vecItems.clear();
	m_pListItems->ResetContent();

	for( int i = 0; i < prj.m_aPropItem.GetSize(); ++i )
	{
		ItemProp *pProp = prj.m_aPropItem.GetAt(i);
		if( pProp )
		{
			bool bInArray = false;
			for( int j = 0; j < sizeof(dwItems) / sizeof(dwItems[0]); ++j )
			{
				if( pProp->dwID == dwItems[j] )
				{
					bInArray = true;
					break;
				}
			}
			if( strstr(pProp->szName,"?") )
				continue;
			if( pProp->dwLimitLevel1 > MAX_CHARACTER_LEVEL && pProp->dwLimitLevel1 != NULL_ID )
				continue;
			if( !strlen(pProp->szName) )
				continue;
			if( !strlen(pProp->szIcon) )
				continue;
			if( bInArray )
				continue;
			if( dwJob != JOB_VAGRANT )
			{
				if( pProp->dwItemJob != dwJob )
					continue;
			}
			if( dwFilter != NULL_ID )
			{
				if( pProp->dwItemKind1 != dwFilter )
					continue;
			}
			if( strFilter.GetLength() )
			{
				CString strName = pProp->szName;
				if( !strstr(strName.MakeLower(),strFilter.MakeLower()) )
					continue;
			}
			m_vecItems.push_back(pProp);
			m_pListItems->AddString("");
		}
	}
}

bool SortByNameUpper(const ItemProp *pPropLeft, const ItemProp *pPropRight)
{
	std::string strLeft = pPropLeft->szName;
	std::string strRight = pPropRight->szName;
	return (strLeft < strRight);
}
bool SortByNameLower(const ItemProp *pPropLeft, const ItemProp *pPropRight)
{
	std::string strLeft = pPropLeft->szName;
	std::string strRight = pPropRight->szName;
	return (strLeft > strRight);
}
bool SortByLevelUpper(const ItemProp *pPropLeft, const ItemProp *pPropRight)
{
	int nLevelLeft = (pPropLeft->dwLimitLevel1 == NULL_ID ? 1 : pPropLeft->dwLimitLevel1);
	int nLevelRight = (pPropRight->dwLimitLevel1 == NULL_ID ? 1 : pPropRight->dwLimitLevel1);
	return (nLevelLeft < nLevelRight);
}
bool SortByLevelLower(const ItemProp *pPropLeft, const ItemProp *pPropRight)
{
	int nLevelLeft = (pPropLeft->dwLimitLevel1 == NULL_ID ? 1 : pPropLeft->dwLimitLevel1);
	int nLevelRight = (pPropRight->dwLimitLevel1 == NULL_ID ? 1 : pPropRight->dwLimitLevel1);
	return (nLevelLeft > nLevelRight);
}
bool SortByJobUpper(const ItemProp *pPropLeft, const ItemProp *pPropRight)
{
	return (pPropLeft->dwItemJob < pPropRight->dwItemJob);
}
bool SortByJobLower(const ItemProp *pPropLeft, const ItemProp *pPropRight)
{
	return (pPropLeft->dwItemJob > pPropRight->dwItemJob);
}

void CWndWiki::SortByName()
{
	if( m_bUpperCase )
		std::sort(m_vecItems.begin(),m_vecItems.end(), SortByNameUpper);
	else
		std::sort(m_vecItems.begin(),m_vecItems.end(), SortByNameLower);
}

void CWndWiki::SortByLevel()
{
	if( m_bUpperCase )
		std::sort(m_vecItems.begin(),m_vecItems.end(), SortByLevelUpper);
	else
		std::sort(m_vecItems.begin(),m_vecItems.end(), SortByLevelLower);
}

void CWndWiki::SortByJob()
{
	if( m_bUpperCase )
		std::sort(m_vecItems.begin(),m_vecItems.end(), SortByJobUpper);
	else
		std::sort(m_vecItems.begin(),m_vecItems.end(), SortByJobLower);
}

void CWndWiki::Sort()
{
	m_pListItems->EnableWindow(FALSE);
	switch( m_cSortType )
	{
	case 0: SortByName(); break;
	case 1: SortByJob(); break;
	case 2: SortByLevel(); break;
	}
	m_pListItems->EnableWindow(TRUE);
}

CWndWikiCreate::CWndWikiCreate()
{
	m_pPropCreate = NULL;
}

BOOL CWndWikiCreate::Initialize(CWndBase *pWndParent, DWORD dwStyle)
{
	return CWndNeuz::InitDialog(g_Neuz.GetSafeHwnd(),APP_WIKICI,WBS_MODAL,0,pWndParent);
}

void CWndWikiCreate::OnInitialUpdate()
{
	CWndNeuz::OnInitialUpdate();

	m_pStcName = (CWndStatic*)GetDlgItem(WIDC_STATIC1);
	m_pDrawCtrl = GetWndCtrl(WIDC_STATIC4);
	m_pEditAmount = (CWndEdit*)GetDlgItem(WIDC_EDIT1);
	m_pEditAmount->AddWndStyle(EBS_NUMBER);
	m_pEditAmount->SetString("1");
	m_pEditName = (CWndEdit*)GetDlgItem(WIDC_EDIT2);

	MoveParentCenter();
}

void CWndWikiCreate::OnDraw(C2DRender *p2DRender)
{
	CWndNeuz::OnDraw(p2DRender);
	if( m_pPropCreate )
	{
		CTexture *pTex = CWndBase::m_textureMng.AddTexture(p2DRender->m_pd3dDevice, MakePath(DIR_ITEM,m_pPropCreate->szIcon), 0xffff00ff);
		if( pTex )
			pTex->Render(p2DRender,CPoint(m_pDrawCtrl->rect.left+6,m_pDrawCtrl->rect.top+6));
	}
}

BOOL CWndWikiCreate::OnChildNotify(UINT message, UINT nID, LRESULT *pLResult)
{
	if( nID == WIDC_BUTTON1 )
	{
		if( m_pPropCreate )
		{
			int nAmount = atoi(m_pEditAmount->GetString());
			if( nAmount > 0 && nAmount < 100 )
			{
				g_DPlay.SendWikiCreateItem(m_pPropCreate,nAmount,m_pEditName->GetString());
				Destroy();
			}
		}
	}else if( nID == WIDC_BUTTON2 )
	{
		Destroy();
	}
	return CWndNeuz::OnChildNotify(message,nID,pLResult);
}

void CWndWikiCreate::OnMouseWndSurface(CPoint point)
{
	if( m_pDrawCtrl->rect.PtInRect(point) )
	{
		if( m_pPropCreate )
		{
			CItemElem itemElem;
			CRect rect = m_pDrawCtrl->rect;
			itemElem.m_dwItemId = m_pPropCreate->dwID;
			ClientToScreen(&point);
			ClientToScreen(&rect);
			g_WndMng.PutToolTip_Item(&itemElem,point,&rect);
		}
	}
}

void CWndWikiCreate::SetItem(ItemProp *pPropCreate)
{
	m_pPropCreate = pPropCreate;
	if( m_pPropCreate )
		m_pStcName->SetTitle(m_pPropCreate->szName);
	else
		m_pStcName->SetTitle("");
}
#endif // __WIKI

WndWiki.h
Code:
#pragma once

#ifdef __WIKI
class CWndWikiCreate;

class CWndWiki : public CWndNeuz
{
private:
	CWndWikiCreate *m_pCreate;
	vector<ItemProp*> m_vecItems;
	CWndListBox *m_pListItems;
	CWndComboBox *m_pComboKind;
	CWndComboBox *m_pComboJob;
	CWndEdit *m_pEditFilter;

	HANDLE m_hSortThread;

	bool m_bUpperCase;
	char m_cSortType;

public:
	CWndWiki();
	~CWndWiki();

	virtual BOOL Initialize(CWndBase *pWndParent = NULL, DWORD dwStyle = 0);

	virtual void OnInitialUpdate();

	virtual BOOL OnChildNotify(UINT message, UINT nID, LRESULT *pLResult);

	vector<ItemProp*>* GetItemList(){ return &m_vecItems; }
	
	void UpdateList();
	void SortByName();
	void SortByLevel();
	void SortByJob();

	void Sort();
};

class CWndWikiCreate : public CWndNeuz
{
private:
	ItemProp *m_pPropCreate;
	CWndEdit *m_pEditAmount;
	CWndEdit *m_pEditName;
	LPWNDCTRL m_pDrawCtrl;
	CWndStatic *m_pStcName;

public:
	CWndWikiCreate();

	virtual BOOL Initialize(CWndBase *pWndParent = NULL, DWORD dwStyle = 0);
	virtual void OnInitialUpdate();
	virtual void OnDraw(C2DRender *p2DRender);
	virtual BOOL OnChildNotify(UINT message,UINT nID,LRESULT *pLResult);
	void OnMouseWndSurface(CPoint point);

	void SetItem(ItemProp *pPropCreate);
};
#endif // __WIKI
brunoi123 is offline  
Old 05/13/2020, 14:19   #2

 
elite*gold: 28
Join Date: Feb 2010
Posts: 463
Received Thanks: 277
check auth to send the snap SendWikiCreateItem.
ZeroTwo02 is offline  
Old 05/18/2020, 11:47   #3



 
Flogolo's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 4,888
Received Thanks: 800
Quote:
Originally Posted by brunoi123 View Post
Wrong section. Post this in "Flyff Private Server"!
Flogolo is offline  
Old 05/20/2020, 13:57   #4
ベトナム警察




 
Lumi's Avatar
 
elite*gold: 0
The Black Market: 517/0/0
Join Date: Jan 2012
Posts: 16,497
Received Thanks: 3,524
Arrow Flyff -> Flyff Private Ser…

#moved
Lumi is offline  
Reply


Similar Threads Similar Threads
[Request Help] Remove mobs / remove eur items / remove npc
02/15/2013 - SRO Private Server - 0 Replies
Iam sure all now saies this guy is mad :D why not remove the db i want to know how i can remove mobs from samrkand and add alex mobs there and remove eur item from npc and drobs and remove some npcs ty guys _________________________ I see that there is too much help here it's my topic no.2 without any answer
Petition To Remove DK evoltion off Dont remove it
01/08/2011 - Dekaron Private Server - 12 Replies
Ex dev of AG dekaron is working with Dekaron Evo. Which he posted the of AG selling a Autovoter which the dev from AG has been fire for over a month!!! also everything is edited off the autovoter that SexyBitch released Photoshop anyone!!!! and Han 911Hacker owner of dekaron evolution posted the petition!!!!!!!!! Top100 Autovote link: New Page 1 this is translated IP 74.52.31.2 THe IP of that adress is the same as Dekaron Evolutions LoginServer IP in Housten Texas!!!!!!!!!!!!!!!!!!!!!!!...



All times are GMT +1. The time now is 18:15.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.