Skip to content

Commit

Permalink
Merge branch 'dev' into wop-talkmode
Browse files Browse the repository at this point in the history
  • Loading branch information
cbnolok authored Dec 6, 2024
2 parents a94339f + 29e9ddc commit 98dec74
Show file tree
Hide file tree
Showing 18 changed files with 315 additions and 79 deletions.
55 changes: 52 additions & 3 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3915,8 +3915,57 @@ Added: 'H' shortcut for variables to get the value as hexadecimal.
13-10-2024, Jhobean
- Added: @PetRelease trigger work like @petdesert and return 1 to prevent the pet from being released.

26-10-2024, canerksk
- Added: Added new local variable in WOPSYSTEM LOCAL.WOPTalkMode and ini settings WOPTalkMode=10
27-11-2024, canerksk
- Added: All skills that have a distance query have been adjusted to take the RANGE values of that skill.
All skills to be used in RANGE;
BLACKSMITHING
MINING // It was added before.
FISHING // It was added before.
LUMBERJACKING // It was added before.
PEACEMAKING
ENTICEMENT
PROVOCATION
COOKING
TAMING
THROWING
SNOOPING
STEALING
Also added BREATH.MAXDIST to Breath. If this property is not given, the default is 14 distance.
- Added: Added NOREJOIN tag for corpses, If the NOREJOIN tag is one, the player cannot come back to life on that corpse. That is, the player comes back to life but not on the corpse.
This tag does not prevent the player from coming back to life, it just prevents them from respawning on that corpse. The player always comes back to life, but not on that corpse.
- Fixed: If you are around an entity that you own and you are trying to open a bank next to a bank, the "bank" command is perceived as a pet command and the bank does not open. There is no problem when you type "bank" after mounting the mount, but "bank" does not work when you dismount. (Issue #1331)

27-11-2024, Gladie
- Fixed: Redeeding t_multi_addon outside of housing system. Before it was only looking for owner of the multi, but in our case we need to know uid of the redeeding char.

2-12-2024, canerksk
- Fixed: Memory OnTick link char if not, the skill will not fail.
If the memory owner is not present, skills do not fail when taking damage, but if the memory owner is alive, skills fail when taking damage.
- Fixed: The entity was jumping frames in flooded pet commands (come, guard).
- Fixed: ITEMMEMORYEQUIP is not triggered in many default memories.
Previously, many memories did not have morex information, but now for some reason many memories have morex information and for this reason the trigger was not triggered in almost most of the memories, the morex query was removed. Also, the slang did not represent the memory item.

02-12-2024, raydie
- Added: Add LAYER_SPELL_Explosion for use delayed explosion spell. Now if set Duration to spell explosion, these duration is the delay to execute the explosion (From UOGuide, explosion spell: 2 second delay between targetting and explosion).

3-12-2024, canerksk
- Added: New trigger @HitReactive Reactive Armor plays a key role in the action mechanism and is currently under very fixed rules. It has been added as a new trigger with some variables to make it a bit more flexible.
@HitReactive
Local.Sound (r/w) =Sound ID, If it is blank or zero, no sound is produced. (Default: 01F1)
Local.EffectID (r/w) = Effect ID, If it is empty or zero, no effect will occur. (Default: 0374a)
Local.Damage (r/w) = This is the more1l, or PolyStr, value coming from the reactive armor spell to i_rune_reactive_armor.
LOCAL.ReflectDamage (r/w) = The amount of damage that will be reflected to this other party
LOCAL.ReduceDamage (r/w) = Amount to be deducted from damage received
LOCAL.DamageType (r/w) = Type of damage received (Default: DAMAGE_FIXED andDAMAGE_REACTIVE)
NOTE;
1. If no ReflectDamage or ReduceDamage values are entered, the system defaults to the Reactive Armor Effect value.
2. No damage amount can be less than 1.

4-12-2024, canerksk
- Fixed: Sphere crash troubleshooting if a player has no CHATNAME value and remove a channel.

6-12-2024, canerksk
- Added: Added LOCAL.WOPTalkMode in @SpellCast trigger and ini setting WOPTalkMode.
In some clients, different operations can be performed in return for this, for example, if this talkmode went from sphere as TALKMODE SPELL, the operation is performed according to this incoming talk mode according to the client versions. Here, the possibility of changing the talkmode according to the client version used is given. By default, TALKMODE_SPELL
Default talk mode: TALKMODE_SPELL = 10
Sphere.ini;
Expand All @@ -3935,4 +3984,4 @@ Added: 'H' shortcut for variables to get the value as hexadecimal.
TALKMODE_YELL = 9 // Can be heard 2 screens away. (client shortcut: !+space)
TALKMODE_SPELL = 10 // Used by spells
TALKMODE_GUILD = 13 // Used by guild chat (client shortcut: \)
TALKMODE_ALLIANCE = 14 // Used by alliance chat (client shortcut: shift+\)
TALKMODE_ALLIANCE = 14 // Used by alliance chat (client shortcut: shift+\)
2 changes: 2 additions & 0 deletions cmake/toolchains/include/OSX-AppleClang_common.inc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function(toolchain_exe_stuff_common)
HINT
"/usr/local/opt/mariadb-connector-c/lib/mariadb"
"/opt/homebrew/var/mariadb-connector-c/lib/mariadb"
"/opt/homebrew/opt/mariadb-connector-c/lib/mariadb"
"/opt/homebrew/opt/mariadb-connector-c/lib"
"/opt/homebrew/lib/mariadb"
)
message(STATUS "Library ${lib_name}: ${lib_${lib_name}_with_path}")
Expand Down
1 change: 1 addition & 0 deletions src/game/CObjBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,7 @@ enum CTRIG_TYPE : short
CTRIG_HitIgnore, // I should ignore this target, just giving a record to scripts.
CTRIG_HitMiss, // I just missed.
CTRIG_HitParry, // I succesfully parried an hit.
CTRIG_HitReactive, // Reactive damage trigger
CTRIG_HitTry, // I am trying to hit someone. starting swing.
CTRIG_HouseDesignBegin, // Starting to customize.
CTRIG_HouseDesignCommit, // I committed a new house design
Expand Down
5 changes: 3 additions & 2 deletions src/game/chars/CChar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ lpctstr const CChar::sm_szTrigName[CTRIG_QTY+1] = // static
"@HitIgnore", // I'm going to avoid a target (attacker.n.ignore=1) , should I un-ignore him?.
"@HitMiss", // I just missed.
"@HitParry", // I succesfully parried an hit.
"@HitReactive", // Reactive damage trigger
"@HitTry", // I am trying to hit someone. starting swing.
"@HouseDesignBegin", // Starting to customize.
"@HouseDesignCommit", // I committed a new house design.
Expand Down Expand Up @@ -2510,7 +2511,7 @@ bool CChar::r_WriteVal( lpctstr ptcKey, CSString & sVal, CTextConsole * pSrc, bo
}
case CHC_BREATH:
{
if( !strnicmp(ptcKey, "BREATH.DAM", 10) )
if (!strnicmp(ptcKey, "BREATH.MAXDIST", 14) || !strnicmp(ptcKey, "BREATH.DAM", 10))
{
CVarDefCont * pVar = GetDefKey(ptcKey, true);
sVal.FormatLLVal(pVar ? pVar->GetValNum() : 0);
Expand Down Expand Up @@ -3808,7 +3809,7 @@ bool CChar::r_LoadVal( CScript & s )
break;
case CHC_BREATH:
{
if ( !strnicmp(ptcKey, "BREATH.DAM", 10) || !strnicmp(ptcKey, "BREATH.HUE", 10) || !strnicmp(ptcKey, "BREATH.ANIM", 11) || !strnicmp(ptcKey, "BREATH.TYPE", 11) || !strnicmp(ptcKey, "BREATH.DAMTYPE", 14))
if ( !strnicmp(ptcKey, "BREATH.MAXDIST", 14) || !strnicmp(ptcKey, "BREATH.DAM", 10) || !strnicmp(ptcKey, "BREATH.HUE", 10) || !strnicmp(ptcKey, "BREATH.ANIM", 11) || !strnicmp(ptcKey, "BREATH.TYPE", 11) || !strnicmp(ptcKey, "BREATH.DAMTYPE", 14))
{
SetDefNum(s.GetKey(), s.GetArgLLVal());
return true;
Expand Down
9 changes: 6 additions & 3 deletions src/game/chars/CCharAct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,14 @@ void CChar::LayerAdd( CItem * pItem, LAYER_TYPE layer )
return;
}

if (!pItem->IsTypeSpellable() && !pItem->m_itSpell.m_spell && !pItem->IsType(IT_WAND)) // can this item have a spell effect ? If so we do not send
{
//if (!pItem->IsTypeSpellable() && !pItem->m_itSpell.m_spell && !pItem->IsType(IT_WAND)) // can this item have a spell effect ? If so we do not send
// Since most of the memories came with a morex information by default, almost no memory was triggered.
if (!(pItem->IsTypeSpellable() || pItem->IsType(IT_WAND)))
{
if ((IsTrigUsed(TRIGGER_MEMORYEQUIP)) || (IsTrigUsed(TRIGGER_ITEMMEMORYEQUIP)))
{
CScriptTriggerArgs pArgs;
//CScriptTriggerArgs pArgs;
CScriptTriggerArgs pArgs(pItem); // added "argo" argument
pArgs.m_iN1 = layer;
if (pItem->OnTrigger(ITRIG_MemoryEquip, this, &pArgs) == TRIGRET_RET_TRUE)
{
Expand Down
66 changes: 53 additions & 13 deletions src/game/chars/CCharFight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -943,19 +943,59 @@ int CChar::OnTakeDamage( int iDmg, CChar * pSrc, DAMAGE_TYPE uiType, int iDmgPhy
{
CItem* pReactive = LayerFind(LAYER_SPELL_Reactive);

if (pReactive)
{
int iReactiveDamage = (iDmg * pReactive->m_itSpell.m_PolyStr) / 100;
if (iReactiveDamage < 1)
{
iReactiveDamage = 1;
}

iDmg -= iReactiveDamage;
pSrc->OnTakeDamage(iReactiveDamage, this, (DAMAGE_TYPE)(DAMAGE_FIXED | DAMAGE_REACTIVE), iDmgPhysical, iDmgFire, iDmgCold, iDmgPoison, iDmgEnergy,(SPELL_TYPE)pReactive->m_itSpell.m_spell);
pSrc->Sound(0x1F1);
pSrc->Effect(EFFECT_OBJ, ITEMID_FX_CURSE_EFFECT, this, 10, 16);
}
if (pReactive)
{
int iReactiveDamage = (iDmg * pReactive->m_itSpell.m_PolyStr) / 100;
int iReactiveRefDam = iReactiveDamage;
int iReactiveRedDam = iReactiveDamage;
SOUND_TYPE ReactiveSnd = 0x1F1;
ITEMID_TYPE ReactiveEffectID = ITEMID_FX_CURSE_EFFECT;
DAMAGE_TYPE ReactiveDamType = (DAMAGE_FIXED | DAMAGE_REACTIVE);

if (IsTrigUsed(TRIGGER_HITREACTIVE))
{
CScriptTriggerArgs HitReactiveArgs;
HitReactiveArgs.m_VarsLocal.SetNum("Sound", ReactiveSnd); // SOUND
HitReactiveArgs.m_VarsLocal.SetNum("EffectID", ReactiveEffectID); // EFFECTID
HitReactiveArgs.m_VarsLocal.SetNum("Damage", iReactiveDamage); // DAMAGE VALUE
HitReactiveArgs.m_VarsLocal.SetNum("ReflectDamage", iReactiveRefDam); // REFLECTED DAM
HitReactiveArgs.m_VarsLocal.SetNum("ReduceDamage", iReactiveRedDam); // REDUCED DAM
HitReactiveArgs.m_VarsLocal.SetNum("DamageType", ReactiveDamType); // DAMAGE TYPE
OnTrigger(CTRIG_HitReactive, pSrc, &HitReactiveArgs);

ReactiveSnd = (SOUND_TYPE)HitReactiveArgs.m_VarsLocal.GetKeyNum("Sound"); // SOUND
ReactiveEffectID = (ITEMID_TYPE)HitReactiveArgs.m_VarsLocal.GetKeyNum("EffectID"); // EFFECTID
iReactiveDamage = (int)HitReactiveArgs.m_VarsLocal.GetKeyNum("Damage"); // DAMAGE VALUE
iReactiveRefDam = (int)HitReactiveArgs.m_VarsLocal.GetKeyNum("ReflectDamage"); // REFLECTED DAMAGE VALUE
iReactiveRedDam = (int)HitReactiveArgs.m_VarsLocal.GetKeyNum("ReduceDamage"); // REDUCED DAMAGE VALUE
ReactiveDamType = (DAMAGE_TYPE)HitReactiveArgs.m_VarsLocal.GetKeyNum("DamageType"); // DAMAGE TYPE
// should it be zero ?
//if (iReactiveDamage < 1)
// iReactiveDamage = 1;

//if (iReactiveRedDam < 1)
// iReactiveRedDam = 1;

//if (iReactiveRefDam < 1)
// iReactiveRefDam = 1;
}

// reduce
if (iReactiveRedDam > 0 || iReactiveDamage > 0)
iDmg -= iReactiveRedDam ? iReactiveRedDam : iReactiveDamage;

// reflect
if (iReactiveRefDam > 0 || iReactiveDamage > 0)
pSrc->OnTakeDamage(iReactiveRefDam ? iReactiveRefDam : iReactiveDamage, this, ReactiveDamType, iDmgPhysical, iDmgFire, iDmgCold,
iDmgPoison, iDmgEnergy, (SPELL_TYPE)pReactive->m_itSpell.m_spell);

if (ReactiveSnd)
pSrc->Sound(ReactiveSnd);

if (ReactiveEffectID)
pSrc->Effect(EFFECT_OBJ, ReactiveEffectID, this, 10, 16);

}
}
}
// Check if REFLECTPHYSICALDAM will reflect some damage back.
Expand Down
14 changes: 10 additions & 4 deletions src/game/chars/CCharNPCPet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,20 @@ bool CChar::NPC_OnHearPetCmd( lpctstr pszCmd, CChar *pSrc, bool fAllPets )
break;

case PC_GUARD_ME:
m_Act_UID = pSrc->GetUID();
Skill_Start(NPCACT_GUARD_TARG);
if ((m_Act_UID != pSrc->GetUID()) || (Skill_GetActive() != NPCACT_GUARD_TARG)) // When you do all guard flood, the mount jumps one frame.
{
m_Act_UID = pSrc->GetUID();
Skill_Start(NPCACT_GUARD_TARG);
}
break;

case PC_COME:
case PC_FOLLOW_ME:
m_Act_UID = pSrc->GetUID();
Skill_Start(NPCACT_FOLLOW_TARG);
if ((m_Act_UID != pSrc->GetUID()) || (Skill_GetActive() != NPCACT_FOLLOW_TARG)) // When you do all come flood, the mount jumps one frame.
{
m_Act_UID = pSrc->GetUID();
Skill_Start(NPCACT_FOLLOW_TARG);
}
break;

case PC_FOLLOW:
Expand Down
Loading

0 comments on commit 98dec74

Please sign in to comment.