Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couple of Fixes #1222

Merged
merged 90 commits into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
e1e4d55
Missing comma.
cbnolok Nov 19, 2023
855dd7d
Fix crafting (#1190)
raydienull Nov 24, 2023
9017458
Add editorconfig (#1188)
raydienull Dec 1, 2023
5e35e44
Fix Issue #1191 CANMASK no save on server reboot (#1192)
Jhobean Dec 7, 2023
c9cfc6c
Fix cancel target death (#1186)
raydienull Dec 7, 2023
8753fc3
Feature/meditation fail movement (#1184)
raydienull Dec 8, 2023
b584596
Fix herding dupe char (#1185)
raydienull Dec 11, 2023
56f6e6c
Editable DispID for chars (#1178)
DavideRei Dec 11, 2023
ea20f76
Fix issue #1097 (CAN_O_NOSLEEP not work on server reboot) (#1198)
Jhobean Dec 13, 2023
a5d5714
Fixed: Rare crash occurring when a NPC is selecting an attackable tar…
cbnolok Dec 13, 2023
646b9d1
CSFile Windows creation file mode fix (#1205)
DavideRei Jan 31, 2024
4bd64cf
Updated SphereCrypt.ini. (#1211)
drk84 Feb 12, 2024
4934125
Add some item props functionnality (#1131)
Jhobean Mar 14, 2024
3be9ce6
Couple of Fixes
xwerswoodx Mar 23, 2024
c4ba839
Update CItem.cpp
xwerswoodx Mar 23, 2024
980eb5b
Couple of Fixes
xwerswoodx Mar 24, 2024
1037519
Couple of Fixes
xwerswoodx Mar 24, 2024
229f4fa
Couple of Fixes
xwerswoodx Mar 24, 2024
c5bf09b
Couple of Fixes
xwerswoodx Mar 24, 2024
cc67d8c
Couple of Fixes
xwerswoodx Mar 24, 2024
422c945
Couple of Fixes
xwerswoodx Mar 24, 2024
841a230
Update CLog.h
xwerswoodx Mar 24, 2024
0980cd8
Couple of Fixes
xwerswoodx Mar 24, 2024
422bacb
Update Changelog.txt
xwerswoodx Mar 24, 2024
6df3fc4
Couple of Fixes
xwerswoodx Mar 25, 2024
0948503
Couple of Fixes
xwerswoodx Mar 26, 2024
ea8ac59
Update Changelog.txt
xwerswoodx Mar 26, 2024
62b51d6
Couple of Fixes
xwerswoodx Mar 26, 2024
2dbe9ba
Couple of Fixes
xwerswoodx Mar 27, 2024
4240b0f
Update CItemMulti.cpp
xwerswoodx Mar 27, 2024
6bc4646
Couple of Fixes
xwerswoodx Mar 27, 2024
4a684b0
REGION_FLAG_HOUSE
xwerswoodx Mar 28, 2024
1786757
@MurderMark Update
xwerswoodx Mar 30, 2024
c52eea5
@RegionResource Fix
xwerswoodx Mar 30, 2024
ceaf0a3
Multi Invalid Region Fix
xwerswoodx Mar 31, 2024
d7f7614
CAN Flags DWORD to UINT64
xwerswoodx Apr 2, 2024
f7c948a
Build Fix
xwerswoodx Apr 2, 2024
33db930
Chat Debug Possible Fix
xwerswoodx Apr 2, 2024
7b806e6
Added Missing Data to sphere.ini
xwerswoodx Apr 2, 2024
a36e879
t_crop update
xwerswoodx Apr 3, 2024
592f0a6
Crop update
xwerswoodx Apr 3, 2024
e080570
Invalid Resource ID
xwerswoodx Apr 3, 2024
0248026
Multi Region
xwerswoodx Apr 8, 2024
3c8cfb8
Elemental Engine Flags
xwerswoodx Apr 8, 2024
ec132ce
Increased CElementDef structure from uint to uint64 as some flags in …
xwerswoodx Apr 8, 2024
642c031
Custom Multi Count
xwerswoodx Apr 9, 2024
e1859c1
Bonded Pet Cannot See Master
xwerswoodx Apr 9, 2024
000c555
Standart Guild Align Fix
xwerswoodx Apr 9, 2024
787fbfd
Console Warnings
xwerswoodx Apr 9, 2024
262f4e4
GMs Dress Players
xwerswoodx Apr 10, 2024
dcaf0af
GM unequip fix
xwerswoodx Apr 10, 2024
9a091a7
Some Review Changes
xwerswoodx Apr 12, 2024
bebbf59
Custom Hosing Fix
xwerswoodx Apr 14, 2024
af32ecc
Merged Jhobean's Pr
xwerswoodx Apr 16, 2024
33dba6c
@Hit and @GetHit as Item Triggers
xwerswoodx Apr 16, 2024
7d887da
Visual Range Update
xwerswoodx Apr 16, 2024
3d86b36
H keyword for Hexadecimal returns
xwerswoodx Apr 17, 2024
4ad60ab
raydienull's LAYER_STABLE PR merge
xwerswoodx Apr 17, 2024
753ff28
Update Changelog.txt
xwerswoodx Apr 17, 2024
b1ba663
c_man_gm
xwerswoodx Apr 18, 2024
82e59ee
NPC Hear Distance
xwerswoodx Apr 18, 2024
75e5be9
CCChampion Rework
xwerswoodx Apr 20, 2024
5d92edc
Fixed forgotten callstack names.
xwerswoodx Apr 20, 2024
6cf816b
T_MULTI_ADDON Fix
xwerswoodx Apr 21, 2024
665ded8
ADDCOMPONENT
xwerswoodx Apr 22, 2024
9951612
Some Review Changes
xwerswoodx Apr 22, 2024
098b10e
Reactivated Hardcoded Fishing Skill
xwerswoodx Apr 22, 2024
2d0446f
Update CCharSkill.cpp
xwerswoodx Apr 22, 2024
3733da5
EF_DAMAGETOOLS Update
xwerswoodx Apr 23, 2024
cc8ac5f
Review Changes
xwerswoodx Apr 23, 2024
8c4d9e6
Review Changes
xwerswoodx Apr 23, 2024
f00c638
Review Changes
xwerswoodx Apr 23, 2024
b4b055f
Update Changelog.txt
xwerswoodx Apr 23, 2024
07a466d
Build Fix and Forgotten Ini Settings Removal
xwerswoodx Apr 23, 2024
0d28677
Forgotten Sphere.ini entry that crashes sphere
xwerswoodx Apr 24, 2024
9ccb383
Fixed my stupid mistake.
xwerswoodx Apr 24, 2024
2e0a8f5
Cancelled default more input for ResourceGetName
xwerswoodx Apr 24, 2024
9ff1647
m_ridFruitOverride CAN_I_SCRIPTEDMORE update
xwerswoodx Apr 24, 2024
688fd68
Update CItemPlant.cpp
xwerswoodx Apr 24, 2024
2f1d08f
Update sphereCrypt.ini
xwerswoodx Apr 24, 2024
0720adf
ConsoleTextColor Location
xwerswoodx Apr 26, 2024
4e1a9c0
Update CItemMulti.cpp
xwerswoodx Apr 26, 2024
999f3af
ResourceGetName
xwerswoodx Apr 26, 2024
0f7fc66
std::max/min
xwerswoodx Apr 26, 2024
de007c2
Revert spellflag_targ_onlyself update
xwerswoodx Apr 26, 2024
a7a494a
H Keyword/Sphere Switch
xwerswoodx Apr 27, 2024
cdc2e62
Update CServerConfig.cpp
xwerswoodx Apr 27, 2024
3b24fea
Build Fix
xwerswoodx Apr 27, 2024
762b6c8
Some Prefix Changes
xwerswoodx Apr 27, 2024
3e87445
SPELLFLAG_NOUNPARALYZE
xwerswoodx Apr 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

# Tab indentation (no size specified)
[Makefile]
indent_style = tab

[*.{c,h,cpp,hpp}]
indent_size = 4
indent_style = space
cpp_indent_case_contents_when_block = true
cpp_new_line_before_open_brace_namespace = same_line
cpp_indent_namespace_contents = true
274 changes: 272 additions & 2 deletions Changelog.txt

Large diffs are not rendered by default.

17 changes: 13 additions & 4 deletions src/common/CLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "CLog.h"


int CEventLog::VEvent(dword dwMask, lpctstr pszFormat, va_list args) noexcept
int CEventLog::VEvent(dword dwMask, lpctstr pszFormat, va_list args, ConsoleTextColor iColor) noexcept
xwerswoodx marked this conversation as resolved.
Show resolved Hide resolved
{
if (pszFormat == nullptr || pszFormat[0] == '\0')
return 0;
Expand All @@ -21,7 +21,7 @@ int CEventLog::VEvent(dword dwMask, lpctstr pszFormat, va_list args) noexcept
// if ( ( pFix = strchr( pszText, 0x0C ) ) )
// *pFix = ' ';

return EventStr(dwMask, pszTemp);
return EventStr(dwMask, pszTemp, iColor);
}

int CEventLog::Event(dword dwMask, lpctstr pszFormat, ...) noexcept
Expand Down Expand Up @@ -60,6 +60,15 @@ int CEventLog::EventWarn(lpctstr pszFormat, ...) noexcept
return iret;
}

int CEventLog::EventCustom(ConsoleTextColor iColor, dword dwMask, lpctstr pszFormat, ...) noexcept
{
va_list vargs;
va_start(vargs, pszFormat);
int iret = VEvent(dwMask, pszFormat, vargs, iColor);
va_end(vargs);
return iret;
}

#ifdef _DEBUG
int CEventLog::EventEvent(lpctstr pszFormat, ...) noexcept
{
Expand Down Expand Up @@ -204,7 +213,7 @@ bool CLog::OpenLog(lpctstr pszBaseDirName) // name set previously.
THREAD_UNIQUE_LOCK_RETURN(CLog::_OpenLog(pszBaseDirName));
}

int CLog::EventStr( dword dwMask, lpctstr pszMsg ) noexcept
int CLog::EventStr( dword dwMask, lpctstr pszMsg, ConsoleTextColor iLogColor) noexcept
{
ADDTOCALLSTACK("CLog::EventStr");
// NOTE: This could be called in odd interrupt context so don't use dynamic stuff
Expand All @@ -217,7 +226,7 @@ int CLog::EventStr( dword dwMask, lpctstr pszMsg ) noexcept

try
{
ConsoleTextColor iLogTextColor = CTCOL_DEFAULT;
ConsoleTextColor iLogTextColor = iLogColor;
ConsoleTextColor iLogTypeColor = CTCOL_DEFAULT;

// Put up the date/time.
Expand Down
10 changes: 6 additions & 4 deletions src/common/CLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ enum LOG_TYPE
LOGM_KILLS = 0x010000, // Log player combat results.
LOGM_HTTP = 0x020000,
LOGM_NOCONTEXT = 0x040000, // do not include context information
LOGM_DEBUG = 0x080000 // debug kind of message with "DEBUG:" prefix
LOGM_DEBUG = 0x080000, // debug kind of message with "DEBUG:" prefix
LOGM_QTY = 0x0FFF00 // All masks.
};

class CSError;
Expand All @@ -58,15 +59,16 @@ class CEventLog
// May include __LINE__ or __FILE__ macro as well ?

protected:
virtual int EventStr(dword dwMask, lpctstr pszMsg) noexcept = 0;
virtual int EventStr(dword dwMask, lpctstr pszMsg, ConsoleTextColor iColor = CTCOL_DEFAULT) noexcept = 0;

int VEvent(dword dwMask, lpctstr pszFormat, va_list args) noexcept;
int VEvent(dword dwMask, lpctstr pszFormat, va_list args, ConsoleTextColor iColor = CTCOL_DEFAULT) noexcept;

public:
int _cdecl Event( dword dwMask, lpctstr pszFormat, ... ) noexcept __printfargs(3,4);
int _cdecl EventDebug(lpctstr pszFormat, ...) noexcept __printfargs(2,3);
int _cdecl EventError(lpctstr pszFormat, ...) noexcept __printfargs(2,3);
int _cdecl EventWarn(lpctstr pszFormat, ...) noexcept __printfargs(2,3);
int _cdecl EventCustom(ConsoleTextColor iColor, dword dwMask, lpctstr pszFormat, ...) noexcept __printfargs(4,5);
#ifdef _DEBUG
int _cdecl EventEvent( lpctstr pszFormat, ... ) noexcept __printfargs(2,3);
#endif //_DEBUG
Expand Down Expand Up @@ -117,7 +119,7 @@ public: bool OpenLog(lpctstr pszName = nullptr);
bool IsLoggedLevel( LOG_TYPE level ) const;
bool IsLogged( dword dwMask ) const;

virtual int EventStr( dword dwMask, lpctstr pszMsg ) noexcept final; // final: for now, it doesn't have any other virtual methods
virtual int EventStr( dword dwMask, lpctstr pszMsg, ConsoleTextColor iLogColor = CTCOL_DEFAULT ) noexcept final; // final: for now, it doesn't have any other virtual methods
void _cdecl CatchEvent( const CSError * pErr, lpctstr pszCatchContext, ... ) __printfargs(3,4);
void _cdecl CatchStdException( const std::exception * pExc, lpctstr pszCatchContext, ... ) __printfargs(3,4);

Expand Down
2 changes: 1 addition & 1 deletion src/common/CScriptObj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2454,7 +2454,7 @@ TRIGRET_TYPE CScriptObj::OnTriggerLoopGeneric(CScript& s, int iType, CTextConsol
if (s.HasArgs())
iDist = s.GetArgVal();
else
iDist = UO_MAP_VIEW_SIZE_DEFAULT;
iDist = g_Cfg.m_iMapViewSize;

CObjBaseTemplate* pObj = dynamic_cast <CObjBaseTemplate*>(this);
if (pObj == nullptr)
Expand Down
Loading
Loading