Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Empty file modified AgentSvc/AgentSvc.h
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions AgentSvc/AgentSvc.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{D6AF1D9D-D4B3-4FEC-8EC3-166406A83AE4}</ProjectGuid>
<Keyword>MFCProj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unicode|Win32'" Label="Configuration">
Expand All @@ -37,7 +37,7 @@
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140_xp</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down
4 changes: 2 additions & 2 deletions AgentSvr/AgentSvr.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{E1FF5388-2AF5-4789-B5C2-DB40C41916CA}</ProjectGuid>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unicode|Win32'" Label="Configuration">
Expand All @@ -37,7 +37,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v140_xp</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Live Debug|Win32'" Label="Configuration">
Expand Down
4 changes: 2 additions & 2 deletions MessageMaker/MessageMaker.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B67BDCBE-DDF6-4BD2-882D-7C0D4BAB1560}</ProjectGuid>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v140_xp</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Live Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
Expand Down
3 changes: 0 additions & 3 deletions MessageMaker/MessageMaker.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,6 @@
<ClInclude Include="RMsg_RoomDescription.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="json_maker.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="cJSON.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down
1 change: 1 addition & 0 deletions Underlight/Central.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const int DEAD_Z = _I16_MAX -1;
extern TCHAR message[DEFAULT_MESSAGE_SIZE];
extern TCHAR disp_message[DEFAULT_MESSAGE_SIZE];
extern TCHAR temp_message[DEFAULT_MESSAGE_SIZE];
extern TCHAR temp_message2[DEFAULT_MESSAGE_SIZE];
extern TCHAR duration_message[DEFAULT_MESSAGE_SIZE];
extern TCHAR modifier_message[DEFAULT_MESSAGE_SIZE];
extern TCHAR guild_name_message[DEFAULT_MESSAGE_SIZE];
Expand Down
7 changes: 7 additions & 0 deletions Underlight/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,13 @@ cJSON** LoadJSONFiles()
}
numJsonFiles = fcount;

if (hFind != FindFirstFile("globals.json", &data))
{
cJSON* globals = WriteGlobalJSONOptionValues();
WriteJSONFile(globals, "globals.json");
cJSON_Delete(globals);
}

if (numJsonFiles > MAX_STORED_ACCOUNTS)
{
GAME_ERROR("Too many JSON files - delete some!");
Expand Down
1 change: 1 addition & 0 deletions Underlight/Realm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ TCHAR message[DEFAULT_MESSAGE_SIZE]; // generic string for output messages
TCHAR values_select[100][DEFAULT_MESSAGE_SIZE];
TCHAR disp_message[DEFAULT_MESSAGE_SIZE]; // generic string for output messages
TCHAR temp_message[DEFAULT_MESSAGE_SIZE]; // generic string for output messages
TCHAR temp_message2[DEFAULT_MESSAGE_SIZE]; // generic string for output messages
TCHAR errbuf[DEFAULT_MESSAGE_SIZE];// generic string for error messages
TCHAR duration_message[DEFAULT_MESSAGE_SIZE];
TCHAR modifier_message[DEFAULT_MESSAGE_SIZE];
Expand Down
4 changes: 2 additions & 2 deletions Underlight/Underlight.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F427253E-F158-4722-B7E1-27761AE6C921}</ProjectGuid>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Master|Win32'" Label="Configuration">
Expand Down Expand Up @@ -109,7 +109,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Development|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v140_xp</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Dev Pmare|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
Expand Down
76 changes: 43 additions & 33 deletions Underlight/cArts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2536,7 +2536,7 @@ void cArts::CreateLocalWeapon(int color)
break;
}
}

actors->IterateItems(DONE);
// default duration for this level of blade
int duration = this->Duration(art_in_use, player->Skill(art_in_use));

Expand Down Expand Up @@ -5526,21 +5526,21 @@ void cArts::ApplyAbjure(int skill, lyra_id_t caster_id)
{
cNeighbor *n = this->LookUpNeighbor(caster_id);

if (caster_id != player->ID () && n == NO_ACTOR)
if (caster_id != player->ID() && n == NO_ACTOR)
return; // MDA 3/18/2004 - bail if the neighbor became NULL between evoke and Apply

this->DisplayUsedByOther(n, Arts::ABJURE);
int num_effects_to_abjure = 1;
int num_effects_active = 0;
int num_effects_abjured = 0;
int curr_skill = skill;
int random,i,j;

int random = 0;
int i, j;
player->EvokedFX().Activate(Arts::ABJURE, false);

for (i=0; i<NUM_TIMED_EFFECTS; i++)
if (player->flags & timed_effects->actor_flag[i] && timed_effects->abjurable[i])
num_effects_active++;
num_effects_active++;

// pmares can only have 1 effect abjured at a time
#ifndef PMARE
Expand All @@ -5555,52 +5555,62 @@ void cArts::ApplyAbjure(int skill, lyra_id_t caster_id)
}

#endif

while (num_effects_active && num_effects_to_abjure)
{
random = rand()%num_effects_active;
j=0; // j = count of active effects skipped by loop
for (i=0; i<NUM_TIMED_EFFECTS; i++)
random = rand() % num_effects_active;
j = 0; // j = count of active effects skipped by loop
for (i = 0; i < NUM_TIMED_EFFECTS; i++)

if ((player->flags & timed_effects->actor_flag[i]) && timed_effects->abjurable[i])
{
if (j == random) // abjure this effect
{
LoadString (hInstance, IDS_ABJURED_EFFECT, disp_message, sizeof(disp_message));
if (caster_id == player->ID())
const TCHAR* playerName = NULL;
LoadString(hInstance, IDS_ABJURED_EFFECT, disp_message, sizeof(disp_message)); // "You have abjured %s from %s!\n"
if (caster_id == player->ID()) //casting on self
{
LoadString(hInstance, IDS_YOURSELF, temp_message, sizeof(temp_message));
LoadString(hInstance, IDS_YOURSELF, temp_message, sizeof(temp_message)); // "yourself"
_stprintf(message, disp_message, timed_effects->name[i], temp_message);
display->DisplayMessage (message);
display->DisplayMessage(message);
}
else
else // not casting on self or im being casted on
{
_stprintf(message, disp_message, timed_effects->name[i], player->Name());
gs->Talk(message, RMsg_Speech::SYSTEM_WHISPER, caster_id);
if (n != NO_ACTOR)
{
LoadString(hInstance, IDS_ABJURED_EFFECT_OTHER, disp_message, sizeof(disp_message));
_stprintf(message, disp_message, n->Name(), timed_effects->name[i]);

LoadString(hInstance, IDS_FEMALE_DREAMER, temp_message2, sizeof(temp_message2)); // female
LoadString(hInstance, IDS_MALE_DREAMER, temp_message, sizeof(temp_message)); // male
playerName = player->IsDreamerAccount() ? (player->IsPMare() ? player->Name() : (player->IsMale()? temp_message : temp_message2)) : player->Name();
_stprintf(message, disp_message, timed_effects->name[i], playerName);
gs->Talk(message, RMsg_Speech::SYSTEM_WHISPER, caster_id); //send msg to person it's landing on

if (n->ID() == caster_id && n != NO_ACTOR)// being casted on! by a real not us dreamer!
{
playerName = n->IsPMare() ? (player->IsMale() ? temp_message : temp_message2) : n->Name();
LoadString(hInstance, IDS_ABJURED_EFFECT_OTHER, disp_message, sizeof(disp_message)); //"%s has abjured %s from you!\n"
_stprintf(message, disp_message, playerName, timed_effects->name[i]);
}
else {
else
{
_stprintf(message, "%s has been abjured from you!\n", timed_effects->name[i]);
}

display->DisplayMessage (message);
display->DisplayMessage(message);
}
player->RemoveTimedEffect(i);
break;
player->RemoveTimedEffect(i);
break;
}
else
j++;
}
num_effects_active--;
num_effects_to_abjure--;
num_effects_abjured++;
if (i == NUM_TIMED_EFFECTS)
{
GAME_ERROR(IDS_ABJURE_FAIL);
return;
}
num_effects_active--;
num_effects_to_abjure--;
num_effects_abjured++;
if (i == NUM_TIMED_EFFECTS)
{
GAME_ERROR(IDS_ABJURE_FAIL);
return;
}


}

if (!num_effects_abjured && (caster_id == player->ID()))
Expand Down
26 changes: 24 additions & 2 deletions Underlight/cChat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ const struct window_pos_t chatPos[MAX_RESOLUTIONS] =
const struct window_pos_t entryPos[MAX_RESOLUTIONS] =
{ { 0, 455, 480, 25 }, { 0, 570, 600, 35 }, { 0, 733, 768, 40 } };
#else
const struct window_pos_t classicChatPos[MAX_RESOLUTIONS] =
{ { 0, 300, 480, 180 },{ 0, 375, 600, 225 },{ 0, 480, 768, 288 } }; //added to fix undeclared ident on pmare
const struct window_pos_t chatPos[MAX_RESOLUTIONS] =
{ { 0, 300, 480, 180 },{ 0, 375, 600, 225 },{ 0, 480, 768, 288 } };
#endif
Expand Down Expand Up @@ -631,6 +633,15 @@ _stprintf(emoteCF.szFaceName, FONT_NAME);
nameCF.crTextColor = (RGB(chat_colors[color].red, chat_colors[color].green, chat_colors[color].blue));
_stprintf(nameCF.szFaceName, FONT_NAME);
SendMessage(hwnd_richedit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&nameCF);

// lets try this for gm raw and graw ~christy
memset(&raw_grawCF, 0, sizeof(raw_grawCF));
raw_grawCF.cbSize = sizeof(raw_grawCF);
raw_grawCF.dwMask = CFM_FACE | CFM_ITALIC | CFM_BOLD | CFM_COLOR;
raw_grawCF.dwEffects = CFM_ITALIC | CFM_BOLD;
raw_grawCF.crTextColor = (RGB(chat_colors[color].red, chat_colors[color].green, chat_colors[color].blue));
_stprintf(raw_grawCF.szFaceName, FONT_NAME);
SendMessage(hwnd_richedit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&raw_grawCF);
}

void cChat::SetWhisperFormat(int color)
Expand Down Expand Up @@ -703,6 +714,11 @@ void cChat::SwitchMode(int mode)
SendMessage(hwnd_richedit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&whisperCF);
currMode = WHISPER;
break;

case RAW_GRAW: //added by christy for raw_graw
SendMessage(hwnd_richedit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&raw_grawCF);
currMode = RAW_GRAW;
break;
}

currMode = mode;
Expand Down Expand Up @@ -822,8 +838,9 @@ void cChat::DisplaySpeech(const TCHAR *text, TCHAR *name, int speechType, bool i
this->PreDisplay(); // set line counts, offset correctly

_tcsnccpy(speech, text, sizeof(speech));

if (isEmote)
if (speechType == RMsg_Speech::RAW_EMOTE) //added by christy
this->SwitchMode(RAW_GRAW);
else if (isEmote)
this->SwitchMode(EMOTE);
else if (speechType == RMsg_Speech::WHISPER)
this->SwitchMode(WHISPER);
Expand Down Expand Up @@ -851,6 +868,11 @@ void cChat::DisplaySpeech(const TCHAR *text, TCHAR *name, int speechType, bool i
_stprintf(message, _T(">%s "), name);
break;
case RMsg_Speech::RAW_EMOTE:
if (speech[0] == '\'')
_stprintf(message, _T(">%s"));
else
_stprintf(message, _T(">%s "));
break;
case RMsg_Speech::DISTRESS_CALL:
_stprintf(message, _T(""));
break;
Expand Down
4 changes: 2 additions & 2 deletions Underlight/cChat.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const int NUM_CHAT_BUTTONS = 4;

enum // current paragraph format
{
PLAYER_SPEECH, PLAYER_NAME, SYSTEM_MESSAGE, EMOTE, WHISPER
PLAYER_SPEECH, PLAYER_NAME, SYSTEM_MESSAGE, EMOTE, WHISPER, RAW_GRAW
};


Expand All @@ -49,7 +49,7 @@ class cChat
WNDPROC lpfn_richedit, lpfn_entry; // pointer to window procedure
HBITMAP chat_buttons_bitmaps[NUM_CHAT_BUTTONS][2];
PARAFORMAT chatPF; // paragraph format
CHARFORMAT speechCF, nameCF, systemCF, emoteCF, whisperCF; // character formats for other player's speech, names, and system messages
CHARFORMAT speechCF, nameCF, systemCF, emoteCF, raw_grawCF, whisperCF; // character formats for other player's speech, names, and system messages, edited by christy to include raw_grawCF
cOutput *chatlog; // for logging chat
int currMode; // current mode - player speech, system, etc.
bool first_message; // has a message been displayed yet?
Expand Down
8 changes: 8 additions & 0 deletions Underlight/cNeighbor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,14 @@ bool cNeighbor::IsMale(void)
return false;
}

// returns true if we're a pmare; based on account type
bool cNeighbor::IsPMare(void)
{
if (avatar.AvatarType() == LmAvatar::ACCT_PMARE)
return true;
return false;
}

// returns avatar type
unsigned int cNeighbor::GetAvatarType(void)
{
Expand Down
1 change: 1 addition & 0 deletions Underlight/cNeighbor.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ class cNeighbor : public cActor

bool IsFemale (void);
bool IsMale (void);
bool IsPMare(void);
bool IsMonster (void);
bool IsVulnerable (void);
bool CanWhisper(void);
Expand Down