The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
+9 dagger
Author Message
Mad Gunther
Apprentice
*

Posts: 45
Likes Given: 11
Likes Received: 5 in 5 posts
Joined: Oct 2015
Reputation: 1



Post: #8
RE: +9 dagger
Thanks for answer Coruja. I have tried that on a brand new sphere 56d and 5.0.1 client and nothing seems to change with weapons. I have even desactivated the cilocs,tooltips and all of this by default plus player event to force it to act like the old way and it didn´t work either.

The only thing i´ve been able to see in source is a getter method called armor_getdefense in armor class that contains the calculations and returns the value taking in count the enchant spell, but i´ve not found the same with weapons (my programming knowledge with OOP is quite limited and poor, so i don´t know if that´s right):

Code:
int CItem::Armor_GetDefense() const
{
    ADDTOCALLSTACK("CItem::Armor_GetDefense");
    // Get the defensive value of the armor. plus magic modifiers.
    // Subtract for low hitpoints.
    if ( ! IsTypeArmor())
        return 0;

    int iVal = m_defenseBase + m_ModAr;
    if ( IsSetOF(OF_ScaleDamageByDurability) && m_itArmor.m_Hits_Max > 0 && m_itArmor.m_Hits_Cur < m_itArmor.m_Hits_Max )
    {
        int iRepairPercent = 50 + ((50 * m_itArmor.m_Hits_Cur) / m_itArmor.m_Hits_Max);
        iVal = IMULDIV( iVal, iRepairPercent, 100 );
    }
[b]    if ( IsAttr(ATTR_MAGIC) )
        iVal += g_Cfg.GetSpellEffect( SPELL_Enchant, m_itArmor.m_spelllevel );[/b]
    if ( iVal < 0 )
        iVal = 0;
    return iVal;
}

Furthermore, with armors it happends the same for me, i can´t see the +number on them just like with weapons. I haven´t been able to find any reference in source where it shows that this value has to be displayed in the name itself of a weapon or armor.

For me is easy (and 4 everyone here lol) to do this softcoded with sphere, i store the respecting number in more2 property of the item and item name should look like this in script under create trigger:

Code:
name = a +<more2> Halberd of Vanquishing

but i was curious about it and is what so far i´ve been able to find. Maybe i have some muls files messing around with cilocs and that´s causing the trouble, but for now im not going to invest more time in that because is something easy to fix by script side.

Greetings and sorry for posting the whole holy bible here.
(This post was last modified: 04-21-2019 05:42 AM by Mad Gunther.)
04-21-2019 05:40 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
+9 dagger - x77x - 04-09-2018, 06:42 AM
RE: +9 dagger - ShiryuX - 04-09-2018, 01:42 PM
RE: +9 dagger - Coruja - 04-12-2018, 04:41 AM
RE: +9 dagger - x77x - 04-12-2018, 08:42 AM
RE: +9 dagger - Coruja - 04-12-2018, 03:06 PM
RE: +9 dagger - Mad Gunther - 03-02-2019, 05:32 AM
RE: +9 dagger - Coruja - 03-10-2019, 08:12 AM
RE: +9 dagger - Mad Gunther - 04-21-2019 05:40 AM
RE: +9 dagger - x77x - 04-22-2019, 11:07 AM
RE: +9 dagger - Mad Gunther - 04-26-2019, 07:14 AM
RE: +9 dagger - Coruja - 05-26-2019, 06:17 AM
RE: +9 dagger - x77x - 04-26-2019, 09:13 AM
RE: +9 dagger - ShiryuX - 05-20-2019, 03:01 AM
RE: +9 dagger - x77x - 05-21-2019, 09:02 PM
RE: +9 dagger - ShiryuX - 05-28-2019, 08:19 PM

Forum Jump:


User(s) browsing this thread: 4 Guest(s)