Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
First modification of CryptoCore
Browse files Browse the repository at this point in the history
1-Changer les anim de gargoyle afin que les nains obtiennent les même anims que les c_man
2-Empecher que Insubtantial soit vue comme un état "mort" il est donc possible pour le CL d'utiliser cet état sans avoir de bug
3-Supprimer les noms et le message "YOU SEE" inutile dans les EMOTES (important de modifier msg.scp aussi): Commit
  • Loading branch information
Jhobean committed Dec 10, 2020
1 parent 92b7475 commit 646bd29
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
20 changes: 10 additions & 10 deletions src/game/CObjBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,25 +508,25 @@ void CObjBase::Emote(lpctstr pText, CClient * pClientExclude, bool fForcePossess

if ( pObjTop != this )
{
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_1), pObjTop->GetName(), GetName(), pText);
snprintf(pszYou, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_2), GetName(), pText);
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_1), GetName(), pText);
snprintf(pszYou, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_2), pText);
}
else if ( fForcePossessive )
{
// ex. "You see joes poor shot ruin an arrow"
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_3), GetName(), pText);
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_3), pText);
snprintf(pszYou, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_4), pText);
}
else
{
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_5), GetName(), pText);
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_5), pText);
snprintf(pszYou, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_6), pText);
}
}
else
{
// Top level is an item. Article ?
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_7), GetName(), pText);
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_7), pText);
strcpy(pszYou, pszThem);
}

Expand Down Expand Up @@ -574,25 +574,25 @@ void CObjBase::Emote2(lpctstr pText, lpctstr pText1, CClient * pClientExclude, b
// Someone has this equipped.
if ( pObjTop != this )
{
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_1), pObjTop->GetName(), GetName(), pText1);
snprintf(pszYou, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_2), GetName(), pText);
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_1), pObjTop->GetName(), pText1);
snprintf(pszYou, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_2), pText);
}
else if ( fForcePossessive )
{
// ex. "You see joes poor shot ruin an arrow"
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_3), GetName(), pText1);
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_3), pText1);
snprintf(pszYou, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_4), pText);
}
else
{
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_5), GetName(), pText1);
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_5), pText1);
snprintf(pszYou, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_6), pText);
}
}
else
{
// Top level is an item. Article ?
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_7), GetName(), pText1);
snprintf(pszThem, STR_TEMPLENGTH, g_Cfg.GetDefaultMsg(DEFMSG_MSG_EMOTE_7), pText1);
strcpy(pszYou, pszThem);
}

Expand Down
8 changes: 4 additions & 4 deletions src/game/chars/CCharAct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1229,8 +1229,8 @@ bool CChar::UpdateAnimate(ANIM_TYPE action, bool fTranslate, bool fBackward , by
CNetState* state = pClient->GetNetState();
if (state->isClientEnhanced() || state->isClientKR())
cmdnew->send(pClient);
else if (IsGargoyle() && state->isClientVersion(MINCLIVER_NEWMOBILEANIM))
cmdnew->send(pClient);
/*else if (IsGargoyle() && state->isClientVersion(MINCLIVER_NEWMOBILEANIM))
cmdnew->send(pClient);*/
else
cmd->send(pClient);
}
Expand Down Expand Up @@ -3373,7 +3373,7 @@ CRegion * CChar::CanMoveWalkTo( CPointMap & ptDst, bool fCheckChars, bool fCheck

EXC_SET_BLOCK("Creature bumping");
ushort uiStamReq = 0;
if ( fCheckChars && !IsStatFlag(STATF_DEAD|STATF_SLEEPING|STATF_INSUBSTANTIAL) )
if ( fCheckChars && !IsStatFlag(STATF_DEAD|STATF_SLEEPING) ) //|STATF_INSUBSTANTIAL
{
CItem *pPoly = LayerFind(LAYER_SPELL_Polymorph);
CWorldSearch AreaChars(ptDst);
Expand All @@ -3384,7 +3384,7 @@ CRegion * CChar::CanMoveWalkTo( CPointMap & ptDst, bool fCheckChars, bool fCheck
break;
if (pChar->Can(CAN_C_STATUE))
return nullptr; // can't walk over a statue
if ( (pChar == this) || (abs(pChar->GetTopZ() - ptDst.m_z) > 5) || (pChar->IsStatFlag(STATF_INSUBSTANTIAL)) )
if ( (pChar == this) || (abs(pChar->GetTopZ() - ptDst.m_z) > 5) )//|| (pChar->IsStatFlag(STATF_INSUBSTANTIAL))
continue;
if ( m_pNPC && pChar->m_pNPC ) // NPCs can't walk over another NPC
return nullptr;
Expand Down
4 changes: 2 additions & 2 deletions src/game/chars/CCharFight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1520,14 +1520,14 @@ WAR_SWING_TYPE CChar::Fight_CanHit(CChar * pCharSrc, bool fSwingNoRange)
// WAR_SWING_SWINGING = taking my swing now

// We can't hit them. Char deleted? Target deleted? Am I dead or stoned? or Is target Dead, stone, invul, insub or slept?
if (IsDisconnected() || pCharSrc->IsDisconnected() || IsStatFlag(STATF_DEAD | STATF_STONE) || (pCharSrc->IsStatFlag(STATF_DEAD | STATF_STONE | STATF_INVUL | STATF_INSUBSTANTIAL)))
if (IsDisconnected() || pCharSrc->IsDisconnected() || IsStatFlag(STATF_DEAD | STATF_STONE) || (pCharSrc->IsStatFlag(STATF_DEAD | STATF_STONE | STATF_INVUL )))//| STATF_INSUBSTANTIAL
{
return WAR_SWING_INVALID;
}
// We can't hit them right now. Because we can't see them or reach them (invis/hidden).
// Why the target is freeze we are change the attack type to swinging? Player can still attack paralyzed or sleeping characters.
// We make sure that the target is freeze or sleeping must wait ready for attack!
else if ( (pCharSrc->IsStatFlag(STATF_HIDDEN | STATF_INVISIBLE | STATF_SLEEPING)) || (IsStatFlag(STATF_FREEZE | STATF_SLEEPING)) ) // STATF_FREEZE | STATF_SLEEPING
else if ( (pCharSrc->IsStatFlag(STATF_HIDDEN | STATF_INVISIBLE | STATF_SLEEPING | STATF_INSUBSTANTIAL)) || (IsStatFlag(STATF_FREEZE | STATF_SLEEPING)) ) // STATF_FREEZE | STATF_SLEEPING
{
return WAR_SWING_SWINGING;
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/chars/CCharStatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,7 @@ bool CChar::CanMove( const CItem *pItem, bool fMsg ) const
if ( pItem->IsAttr(ATTR_MOVE_NEVER|ATTR_LOCKEDDOWN) && !pItem->IsAttr(ATTR_MOVE_ALWAYS) )
return false;

if ( IsStatFlag(STATF_STONE|STATF_FREEZE|STATF_INSUBSTANTIAL|STATF_DEAD|STATF_SLEEPING) || Can(CAN_C_STATUE) )
if ( IsStatFlag(STATF_STONE|STATF_FREEZE|STATF_DEAD|STATF_SLEEPING) || Can(CAN_C_STATUE) )//|STATF_INSUBSTANTIAL
{
if ( fMsg )
SysMessageDefault(DEFMSG_CANTMOVE_DEAD);
Expand Down
2 changes: 1 addition & 1 deletion src/game/chars/CCharUse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ bool CChar::Use_Item_Web( CItem * pItemWeb )
// RETURN: true = held in place.
// false = walk thru it.

if ( GetDispID() == CREID_GIANT_SPIDER || !pItemWeb || !pItemWeb->IsTopLevel() || IsStatFlag(STATF_DEAD|STATF_INSUBSTANTIAL) || IsPriv(PRIV_GM) )
if ( GetDispID() == CREID_GIANT_SPIDER || !pItemWeb || !pItemWeb->IsTopLevel() || IsStatFlag(STATF_DEAD) || IsPriv(PRIV_GM) )//|STATF_INSUBSTANTIAL
return false; // just walk through it

// Try to break it.
Expand Down

0 comments on commit 646bd29

Please sign in to comment.