EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development: Custom Code (https://www.eqemulator.org/forums/forumdisplay.php?f=665)
-   -   2Handed Backstab (https://www.eqemulator.org/forums/showthread.php?t=39145)

Bohbo 12-26-2014 12:46 PM

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;


rencro 12-26-2014 02:52 PM

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;
                }
        }


lerxst2112 12-26-2014 08:19 PM

Code:

const ItemInst *wpn = CastToClient()->GetInv().GetItem(MainPrimary);
bool havePiercer = wpn && (wpn->GetItem()->ItemType == ItemType1HPiercing || wpn->GetItem()->ItemType == ItemType2HPiercing);

Typed in notepad, not compiled.

demonstar55 12-26-2014 08:29 PM

You may run into client side issues.

Uleat 12-26-2014 09:30 PM

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.

Bohbo 01-13-2015 02:03 AM

I appreciate the replies i think its too much trouble than it is worth. Again thanks.

knowom 03-16-2015 05:30 PM

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


All times are GMT -4. The time now is 09:55 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.