Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-22-2015, 07:06 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Quote:
Originally Posted by Kingly_Krab View Post
Likely, this would be easier done in Perl because it would be done as soon as the player logged in, rather than being handled by something that may or may not be hard-coded client-side, such as start skills and stuff like that.
Easier, yes, but efficient, no. Perl loops are horrible for performance as it locks the entire zone thread in what's basically a VM to a C++ interface.
Reply With Quote
  #2  
Old 09-22-2015, 07:18 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

Quote:
Originally Posted by Secrets View Post
Easier, yes, but efficient, no. Perl loops are horrible for performance as it locks the entire zone thread in what's basically a VM to a C++ interface.
Yeah, super fun to lock a zone thread by creating a endless loop when using a 'while' loop. But I'm sure this could be simplified in C++ and added to the level up code by creating a client method like Client::MaxSkills or something.
Reply With Quote
  #3  
Old 09-22-2015, 10:32 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Quote:
Originally Posted by Kingly_Krab View Post
Yeah, super fun to lock a zone thread by creating a endless loop when using a 'while' loop. But I'm sure this could be simplified in C++ and added to the level up code by creating a client method like Client::MaxSkills or something.
No; The loop wouldn't be endless, it would end, but freeze the entire zone while it is processing. This is unacceptable by anyone's standards.

Note clients would still receive data as that's handled in another thread entirely.

The point I was making is it'd be faster to make a method in C++ that you can call from Perl as opposed from looping in Perl.
Reply With Quote
  #4  
Old 09-23-2015, 08:56 PM
AdrianD
Discordant
 
Join Date: Dec 2013
Posts: 297
Default

Below are the changes I made, it seems to work but, curious if everything looks right.

Also, I couldn't figure out how to do this using <GetArchectype>. If someone could throw me a bone, I'd appreciate it.

Code:
void Client::SetClassStartingSkills(PlayerProfile_Struct *pp)
{
	
			switch (pp->class_)	
			{
			case WARRIOR:
				{
				pp->skills[Skill1HSlashing] = 5;
				break;
				}
			case PALADIN:
				{
				pp->skills[Skill1HSlashing] = 5;
				break;
				}
			case RANGER:
				{
				pp->skills[Skill1HSlashing] = 5;
				break;
				}
			case SHADOWKNIGHT:
				{
				pp->skills[Skill1HSlashing] = 5;
				break;
				}
			case BARD:
				{
				pp->skills[Skill1HSlashing] = 5;
				break;
				}
			case CLERIC:
				{
				pp->skills[Skill1HBlunt] = 5;
				break;
				}
			case DRUID:
				{
				pp->skills[Skill1HBlunt] = 5;
				break;
				}
			case MONK:
				{
				pp->skills[Skill1HBlunt] = 5;
				pp->skills[SkillHandtoHand] = 5;
				break;
				}
			case SHAMAN:
				{
				pp->skills[Skill1HBlunt] = 5;
				break;
				}
			case ROGUE:
				{
				pp->skills[Skill1HPiercing] = 5;
				break;
				}
			case NECROMANCER:
				{
				pp->skills[Skill1HPiercing] = 5;
				break;
				}
			case WIZARD:
				{
				pp->skills[Skill1HPiercing] = 5;
				break;
				}
			case MAGICIAN:
				{
				pp->skills[Skill1HPiercing] = 5;
				break;
				}
			case ENCHANTER:
				{
				pp->skills[Skill1HPiercing] = 5;
				break;
				}
			case BERSERKER:
				{
				pp->skills[Skill2HSlashing] = 5;
				break;
				}
			}
}
Is it necessary to have <break;> or <continue;> at the end?

Thanks
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:38 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3