Giter Site home page Giter Site logo

noterius's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

noterius's Issues

Roadmap

Okay, this is list of tasks for working and developing:

  • Integrate LUA scripts (#2)
  • Finish packets for login page
  • Start develop packets for world
  • Integrate small DB scheme (accounts, characters,etc..)
  • Improve handler of packets in pill package.
  • Improve robots system.

Struct of Look

I can't find any information about Look struct in source files.
If anyone can find this, it would help to continue packets.

It's struct embedded in Character info.

Cover "Create character" packet

Take a look into wiki page - https://github.com/Nyarum/noterius/wiki/Network-package
There are you find an information about "How I can write a new packet for emulator?"

Methods from source files:

From client (in package), with some code about returned errors in response packet

WPacket	GroupServerApp::TP_NEWCHA(Player *ply,DataSocket *datasock,RPacket &pk)
{
	WPacket		l_retpk	=GetWPacket();
	if(ply->m_currcha >=0)
	{
		l_retpk.WriteShort(ERR_PT_INERR);					//Ӧ����ֵ��ϵͳ��һ�´���
		return l_retpk;
	}
	MutexArmor l_lockCha(ply->m_mtxCha);
	if(ply->m_chanum >=const_cha.MaxChaNum)		//�Ѵﵽϵͳ��������ɫ��
	{
		l_retpk.WriteShort(ERR_PT_TOMAXCHA);
		return l_retpk;
	}
	uShort	l_len;
	cChar	*l_chaname	=pk.ReadString(&l_len);
	if(!l_chaname)
	{
		l_retpk.WriteShort(ERR_PT_INERR);
		return l_retpk;
	}else if(l_len >16)
	{
		l_retpk.WriteShort(ERR_PT_TOOBIGCHANM);
		return l_retpk;
	}else if(!IsValidName(l_chaname,l_len) || !CTextFilter::IsLegalText(CTextFilter::NAME_TABLE,l_chaname))								//(strchr(l_chaname,'\''))//��ɫ���в����е�����'
	{
		l_retpk.WriteShort(ERR_PT_ERRCHANAME);//��ɫ�����Ϸ�
		return l_retpk;
	}
	//cChar	*	l_birth			=pk.ReadString(&l_len);
	//dstring		l_birth1	="";
	//cChar	*	l_birth2		=0;
	//if(l_birth && l_len <30 && !strchr(l_birth,'/'))
	//{
	//	l_birth1	=dstring("/")<<l_birth<<"/";

	//	try{
	//		l_birth2		=this->m_cfg["��ɫ"]["������"];
	//	}catch(...)
	//	{
	//		l_birth2		=0;
	//	}
	//}else
	//{
	//	l_birth2	=0;
	//}
	//if(!l_birth2 ||!strstr(l_birth2,l_birth1))
	//{
	//	l_retpk.WriteShort(ERR_PT_INVALIDBIRTH);		//�����طǷ�
	//}else
	//{
	cChar	*	l_birth			=pk.ReadString(&l_len);
	dstring		l_birth1		="";
	cChar	*	l_map			=0;
	if(l_birth && l_len <30 && !strchr(l_birth,'/'))
	{
		l_birth1	=l_birth;
		try{
			// Modify by lark.li 20080702 begin
			//l_map	=m_cfg["������"][l_birth];
			//l_map	=m_cfg["birthplace"][l_birth];
			map<string, string>::iterator it = m_mapBirthplace.find(string(l_birth));

			if(it != m_mapBirthplace.end())
			{
				l_map = it->second.c_str();
			}

			// End
		}catch(...)
		{
			l_map	=0;
		}
	}else
	{
		l_map	=0;
	}
	if(!l_map)
	{
		l_retpk.WriteShort(ERR_PT_INVALIDBIRTH);		//�����طǷ�
		return l_retpk;
	}
	const LOOK	*look	=reinterpret_cast<const LOOK*>(pk.ReadSequence(l_len));
	if(!look || l_len !=sizeof(LOOK))
	{
		l_retpk.WriteShort(ERR_PT_INVALIDDAT);
		return l_retpk;
	}
	char	l_look[defLOOK_DATA_STRING_LEN];
	try{
	if(!LookData2String(look,l_look,defLOOK_DATA_STRING_LEN))
	{
		l_retpk.WriteShort(ERR_PT_INVALIDDAT);
		return l_retpk;
	}}catch(...)
	{
		LogLine l_line(g_LogGrpServer);
		//l_line<<newln<<"�ʺ�["<<ply->m_acctname<<"]�½���ɫ["<<l_chaname<<"]ʱ�����������ת���쳣��"<<endln;
		l_line<<newln<<"account["<<ply->m_acctname<<"]new char["<<l_chaname<<"]find appreance data convert exception"<<endln;
		l_retpk.WriteShort(ERR_PT_INVALIDDAT);
		return l_retpk;
	}
	MutexArmor l_lockDB(m_mtxDB);
	if(!m_tblcharaters->InsertRow(l_chaname,ply->m_acctid,l_birth,l_map,l_look))				//��ɫ���ظ�
	{
		LogLine l_line(g_LogGrpServer);
		//l_line<<newln<<"�ʺ�["<<ply->m_acctname<<"]�½���ɫ["<<l_chaname<<"]ʱ���������ظ���"<<endln;
		l_line<<newln<<"account["<<ply->m_acctname<<"]new char["<<l_chaname<<"]the same name exception"<<endln;
		l_retpk.WriteShort(ERR_PT_SAMECHANAME);
		return l_retpk;
	}
	l_retpk.WriteShort(ERR_SUCCESS);
	//�������ݿ����ʺŵĽ�ɫID�б�CharIDs
	if(m_tblcharaters->FetchRowByChaName(l_chaname) <1)
	{
		l_retpk.WriteShort(ERR_PT_INERR);
		LogLine l_line(g_LogGrpServer);
		//l_line<<newln<<"�ʺ�["<<ply->m_acctname<<"]�½���ɫʱ�������޷��ָ������ݿ��������";
		l_line<<newln<<"account["<<ply->m_acctname<<"] when create char , can't restore database failed.";
		return l_retpk;
	}
	ply->m_chaid[ply->m_chanum]		=m_tblcharaters->Getcha_id();
	ply->m_chaname[ply->m_chanum]	=l_chaname;
	ply->m_motto[ply->m_chanum]		=m_tblcharaters->GetMottonByName();
	ply->m_icon[ply->m_chanum]		=m_tblcharaters->GetIconByName();
	ply->m_guild[ply->m_chanum]		=0;
	ply->m_chanum	++;

	char	l_CharIDs[80];	l_CharIDs[0]=0;
	char	l_buf[20];
	for(char i=0;i<ply->m_chanum;i++)
	{
		strcat(l_CharIDs,itoa(ply->m_chaid[i],l_buf,10));
		strcat(l_CharIDs,";");
	}
	m_tblaccounts->UpdateRow(ply->m_acctid,l_CharIDs);
	l_lockDB.unlock();
	LogLine l_line(g_LogGrpServer);
	/*
	l_line<<newln<<"("<<ply->m_clientip<<"):["<<ply->m_acctname<<"]�½��˽�ɫ["
		<<l_chaname<<"]��\t��ǰ��¼/��Ϸ�����:"
		<<m_plylst.GetTotal()<<"/"<<long(m_curChaNum)<<endln;
	*/
	l_line<<newln<<"("<<ply->m_clientip<<"):["<<ply->m_acctname<<"]create char ["
		<<l_chaname<<"]��\t online/total:"
		<<m_plylst.GetTotal()<<"/"<<long(m_curChaNum)<<endln;
	l_lockCha.unlock();
	return l_retpk;
}

From server (out package)

BOOL	SC_NewCha(LPRPACKET pk)
{T_B
	uShort	l_errno	=pk.ReadShort();
	NetNewCha(l_errno);

#ifdef _TEST_CLIENT
	CTestClient* pClient = reinterpret_cast<CTestClient*>( g_NetIF->m_connect.GetDatasock()->GetPointer() );
	pClient->Failure( l_errno );
#endif
	return TRUE;
T_E}
}

Error enums you can find in - https://github.com/Nyarum/noterius/wiki/Error-enums

Getting more done in GitHub with ZenHub

Hola! @Nyarum has created a ZenHub account for the Nyarum organization. ZenHub is the leading team collaboration and project management solution built for GitHub.


How do I use ZenHub?

To get set up with ZenHub, all you have to do is download the browser extension and log in with your GitHub account. Once you do, you’ll get access to ZenHub’s complete feature-set immediately.

What can ZenHub do?

ZenHub adds a series of enhancements directly inside the GitHub UI:

  • Real-time, customizable task boards for GitHub issues;
  • Burndown charts, estimates, and velocity tracking based on GitHub Milestones;
  • Personal to-do lists and task prioritization;
  • “+1” button for GitHub issues and comments;
  • Drag-and-drop file sharing;
  • Time-saving shortcuts like a quick repo switcher.

Add ZenHub to GitHub

Still curious? See more ZenHub features or read user reviews. This issue was written by your friendly ZenHub bot, posted by request from @Nyarum.

ZenHub Board

Use LUA or Go for scripts?

So, currently the official serer files use LUA for script engine.
I can to integrate LUA with custom API to use it for writing script files (Locations, NPCs, items, etc..)

But then we got:

  • Slower performance
  • Errors in runtime
  • Change logic without recompile a server

or the emulator can use Go for scripts and then:

  • Best performance like other things in emulator
  • Errors on a compile step
  • If you change a logic of server you must to recompile it

Cover packets

List of character screen packets:

List of world screen packets:

  • View / Unview object
  • Move
  • Messages
  • Destroy item
  • View / Unview area state
  • Add item
  • Delete item
  • Emotion
  • Character action
    • Move
    • Skill source
    • Skill target
    • Lean
    • Item failed
    • Look
    • Look energy
    • Kitbag
    • Item info
    • Shortcut
    • Temp
    • Change cha
    • Face
    • Skill pose
    • Pk ctrl
    • Bank
    • Kitbag temp
  • Sync attribute
  • Sync skill bag
  • Sync default skill
  • Sync skill state
  • Sync team
  • Sync team leader
  • Help info
  • Talk info
  • Func info
  • Close talk
  • Trade data
  • Trade all data
  • Trade info
  • Trade update
  • Trade result
  • Character trade info
  • Mission info
  • Mission page
  • Mission log
  • Mission log info
  • Mission log clear
  • Mission log add
  • Mission log state
  • Trigger action
  • NPC state change
  • Entity state change
  • Forge
  • Lottery
  • Amphitheater (Unknown)
  • Unite
  • Milling
  • Fusion
  • Upgrade
  • EidolonMetempsychosis (Unknown)
  • Eidolon_Fusion (Unknown)
  • Purify
  • Fix
  • GM Message
  • GM Receiver
  • Get stone
  • Energy
  • Tiger
  • Create boat
  • Update boat
  • Boat info
  • Update boat part
  • Boat list
  • Stall info
  • Stall update info
  • Stall delete goods
  • Stall close
  • Stall success
  • Sync stall name
  • Start exit
  • Cancel exit
  • Update hair resource
  • Open hair cut
  • Team fight ask
  • Begin item repair
  • Item repair ask
  • Item forge ask
  • Item forge answer
  • Item lottery answer
  • Item amphitheater answer
  • Item use success
  • Kitbag capacity
  • Espe item (Unknown)
  • Map crash
  • Message (Global, ...)
  • Query character
  • Query character item
  • Query character ping
  • Query relive
  • Pre move time
  • Map mask
  • Sync event info
  • Sync side info
  • Sync append look
  • Kitbag check answer
  • Store open answer
  • Store list answer
  • Store buy answer
  • Store change answer
  • Store history
  • Act info
  • Store VIP
  • Black market
  • Tiger item
  • Volunteer list
  • Volunteer state
  • Volunteer open
  • Volunteer ask
  • Sync kitbag temp
  • Sync tiger string
  • Captain ask
  • Master ask
  • Prentice ask
  • Master (refresh, cancel, info)
  • Cha play effect
  • List auction
  • PK SIlver
  • Life skill show
  • Life skill

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.