Go Back   EQEmulator Home > EQEmulator Forums > Development > Development: Custom Code

Development: Custom Code This is for code thatdoes not emulate live and wont be added to the official code.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-26-2014, 12:46 PM
Bohbo
Hill Giant
 
Join Date: Dec 2012
Posts: 116
Default 2Handed Backstab

in the special_attacks.cpp around line 513. In the top example it seems to break backstab all together and the client wont recognize 1hp anymore (white client message that you need a piercing in mainhand). In the 2nd example 1hp works but 2hp still gives a red feedback must have a piercing weapon in primary... Any help would be appreciated, I wanted to add 2hp to rogue weapon options.

EDIT: I am not really expecting the && symbol to fix it, I tried a bunch of things including OR but never got anythign to really work just posting some of my trials.

Code:
	if(IsClient()) {
		const ItemInst *wpn = CastToClient()->GetInv().GetItem(MainPrimary);
		if(!wpn || (wpn->GetItem()->ItemType != ItemType2HPiercing) || (wpn->GetItem()->ItemType != ItemType1HPiercing)){
			Message_StringID(13, BACKSTAB_WEAPON);
			return;
Code:
	if(IsClient()) {
		const ItemInst *wpn = CastToClient()->GetInv().GetItem(MainPrimary);
		if(!wpn || (wpn->GetItem()->ItemType != ItemType2HPiercing) && (wpn->GetItem()->ItemType != ItemType1HPiercing)){
			Message_StringID(13, BACKSTAB_WEAPON);
			return;
Reply With Quote
  #2  
Old 12-26-2014, 02:52 PM
rencro
Hill Giant
 
Join Date: Sep 2008
Location: So. California
Posts: 219
Default

I have not compiled this myself but perhaps something like this may work:

Code:
if(IsClient()) {
		const ItemInst *wpn = CastToClient()->GetInv().GetItem(MainPrimary);
		bool havePiercer = true;
		if(!wpn || (wpn->GetItem()->ItemType != ItemType1HPiercing)){
			havePiercer = false;
		}
		if(wpn->GetItem()->ItemType == ItemType2HPiercing || havePiercer == true){
			havePiercer = true;
		}
		if(havePiercer == false) {
			Message_StringID(13, BACKSTAB_WEAPON);
			return;
		}
	}
Reply With Quote
  #3  
Old 12-26-2014, 08:19 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

Code:
const ItemInst *wpn = CastToClient()->GetInv().GetItem(MainPrimary);
bool havePiercer = wpn && (wpn->GetItem()->ItemType == ItemType1HPiercing || wpn->GetItem()->ItemType == ItemType2HPiercing);
Typed in notepad, not compiled.
Reply With Quote
  #4  
Old 12-26-2014, 08:29 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

You may run into client side issues.
Reply With Quote
  #5  
Old 12-26-2014, 09:30 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Yes... /agree demonstar55

In
Code:
Message_StringID(13, BACKSTAB_WEAPON);
'13' indicates a red text color..which is what you were getting in the second example.

The white text is most likely a client-generated message indicating that what you are trying to do is not allowed.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #6  
Old 01-13-2015, 02:03 AM
Bohbo
Hill Giant
 
Join Date: Dec 2012
Posts: 116
Default

I appreciate the replies i think its too much trouble than it is worth. Again thanks.
Reply With Quote
  #7  
Old 03-16-2015, 05:30 PM
knowom's Avatar
knowom
Discordant
 
Join Date: Jun 2006
Posts: 371
Default

I'd suggest just changing the 2 hand pierce items into 1 hand pierce items in your database it's fairly trivial to do so. Though you'd be able to still DW so might want to scale back item stats to reflect that for balance purposes. It would give you the achieved visual appearance your seeking and even allow for a 2H weapon + a shield.

In fact I even at one point made a SQL file where I turned all the 2H weapons and converted them into 1H equip versions of the same items. They have different custom ID #'s as well so no need to worry about them overwriting the original versions.

http://www.eqemulator.org/forums/showthread.php?t=38271

http://i127.photobucket.com/albums/p...psbfd95129.jpg
http://i127.photobucket.com/albums/p...ps6b9f8c06.jpg
__________________
"We are all on the same team, and I think not enough people realize this."
- Leetsauce
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 09:36 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3