...
 
Commits (14)
......@@ -331,3 +331,5 @@ ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
/Bin/Data/json/worldspawns.json
/Bin/Newserver.cfg
# Network
bind_ip=0.0.0.0
bind_port=9110
# Database
database_ip=127.0.0.1
database_username=root
database_password=
database_name=hightide
# World
world_name=Classic Dereth
welcome_popup=
welcome_message=
# If you set this to 1, it will eat up an entire CPU core
fast_tick=0
# Special mode: Characters will be deleted if killed by another player if this is set to 1
hardcore_mode=0
# If this is set to 0 and hardcore mode is set to 1, dying to anything (even monsters) will trigger a character being deleted
hardcore_mode_players_only=0
player_killer_only=1
colored_sentinels=0
# More options can be added at a later time, recommended to set these to "0" for exploration purposes.
spawn_landscape=1
spawn_static_creatures=1
everything_unlocked=0
town_crier_buffs=1
# More options can be added at a later time, recommended to set these to "1" for exploration purposes.
enable_teleport_commands=0
enable_xp_commands=0
enable_attackable_command=0
enable_godly_command=0
# Quest timer multipliers: Set to 0.5 means the quest timers within a range are cut in half
# Only the multiplier in a specific range is used (for example, 50 days will always use the quest_time_multiplier_30_day multiplier, but no other multipliers)
# Be aware there may some side effects (some quests have a limited window on redeeming the reward, these multipliers will affect those too)
quest_time_multiplier_less_than_1_day=1.0
quest_time_multiplier_1_day=1.0
quest_time_multiplier_3_day=1.0
quest_time_multiplier_7_day=1.0
quest_time_multiplier_14_day=1.0
quest_time_multiplier_30_day=1.0
quest_time_multiplier_60_day=1.0
kill_xp_multiplier_T1=1.0
kill_xp_multiplier_T2=2.0
kill_xp_multiplier_T3=4.0
kill_xp_multiplier_T4=4.0
kill_xp_multiplier_T5=4.0
kill_xp_multiplier_T6=4.0
reward_xp_multiplier_T1=1.0
reward_xp_multiplier_T2=2.0
reward_xp_multiplier_T3=4.0
reward_xp_multiplier_T4=4.0
reward_xp_multiplier_T5=4.0
reward_xp_multiplier_T6=4.0
respawn_time_multiplier=1.0
spell_foci_enabled=1
# If this is "0" you'll have to manually create accounts in the database (not advisable unless you know exactly how this works.)
auto_create_accounts=1
# Maximum number of dormant (inactive) landblocks that will be retained in memory before being unloaded entirely.
# Set these two to lower values for less memory usage (for very low usage, set to values less than 100)
max_dormant_landblocks=1000
# Maximum time before unloading a landblock from memory
dormant_landblock_cleanup_time=300
show_logins=0
speed_hack_kicking=0
pk_respite_time=30.0
......@@ -70,7 +70,10 @@ void CAmmunitionWeenie::HandleNonTargetCollision()
if (CWeenieObject *source = g_pWorld->FindObject(_sourceID))
{
source->SendText("Your missile attack hit the environment.", LTT_DEFAULT);
if (source->AsPlayer())
source->SendText("Your missile attack hit the environment.", LTT_DEFAULT);
else
MarkForDestroy();
EmitSound(Sound_Collision, 1.0f);
}
......
......@@ -658,7 +658,7 @@ bool CMonsterWeenie::FinishMoveItemToWield(CWeenieObject *sourceItem, DWORD targ
// 2. Item being equipped from different equip slot.
// 3. Item being equipped from the player's inventory.
bool wasInWorld = (GetBlock() != NULL);
bool isPickup = sourceItem->GetWorldTopLevelOwner() != this;
int error = CheckWieldRequirements(sourceItem, this, WIELD_REQUIREMENTS_INT, WIELD_SKILLTYPE_INT, WIELD_DIFFICULTY_INT);
if (error != WERROR_NONE)
......@@ -737,6 +737,17 @@ bool CMonsterWeenie::FinishMoveItemToWield(CWeenieObject *sourceItem, DWORD targ
{
bool bShouldCast = true;
std::string name;
if (sourceItem->m_Qualities.InqString(CRAFTSMAN_NAME_STRING, name))
{
if (!name.empty() && name != InqStringQuality(NAME_STRING, ""))
{
bShouldCast = false;
NotifyWeenieErrorWithString(WERROR_ACTIVATION_NOT_CRAFTSMAN, name.c_str());
}
}
int difficulty;
difficulty = 0;
if (sourceItem->m_Qualities.InqInt(ITEM_DIFFICULTY_INT, difficulty, TRUE, FALSE))
......@@ -811,7 +822,7 @@ bool CMonsterWeenie::FinishMoveItemToWield(CWeenieObject *sourceItem, DWORD targ
}
}
if(wasInWorld)
if(isPickup)
sourceItem->OnPickedUp(this);
sourceItem->OnWield(this);
return true;
......
......@@ -61,8 +61,11 @@ void CalculateAttributeDamageBonus(DamageEventData *dmgEvent)
else
dmgEvent->source->m_Qualities.InqAttribute(STRENGTH_ATTRIBUTE, attrib, FALSE);
// double attribDamageMod = ((int)attrib - 55.0) / 33.0;
double attribDamageMod = 6.75*(1.0 - exp(-0.005*((int)attrib - 55)));
double attribDamageMod;
if (attrib >= 1000000) //this makes /godly characters use the old formula(huge damage!)
attribDamageMod = ((int)attrib - 55.0) / 33.0;
else
attribDamageMod = 6.75*(1.0 - exp(-0.005*((int)attrib - 55)));
if (attribDamageMod < 0)
dmgEvent->attributeDamageBonus = dmgEvent->baseDamage * (attribDamageMod / 2.0);
else
......
......@@ -1486,9 +1486,8 @@ int CSpellcastingManager::LaunchSpellEffect()
}
CWeenieDefaults *portalDefaults = NULL;
CWeenieObject *weenie = NULL;
bool copyStats = true;
bool canFlagForQuest = false;
if (portalDID)
{
portalDefaults = g_pWeenieFactory->GetWeenieDefaults(portalDID);
......@@ -1518,14 +1517,10 @@ int CSpellcastingManager::LaunchSpellEffect()
}
else if (!m_pWeenie->AsPlayer())
{
weenie = g_pWeenieFactory->CreateWeenieByClassID(portalDID, &spawnPos, false);
copyStats = false;
}
canFlagForQuest = true;
}
if (!weenie)
weenie = g_pWeenieFactory->CreateWeenieByClassID(W_PORTALGATEWAY_CLASS, &spawnPos, false);
CWeenieObject *weenie = g_pWeenieFactory->CreateWeenieByClassID(W_PORTALGATEWAY_CLASS, &spawnPos, false);
if (weenie)
{
......@@ -1535,28 +1530,27 @@ int CSpellcastingManager::LaunchSpellEffect()
bool bHasDestination = false;
if (copyStats)
if (portalDefaults)
{
if(portalDefaults)
{
weenie->CopyPositionStat(DESTINATION_POSITION, &portalDefaults->m_Qualities);
weenie->CopyIntStat(MIN_LEVEL_INT, &portalDefaults->m_Qualities);
weenie->CopyIntStat(MAX_LEVEL_INT, &portalDefaults->m_Qualities);
weenie->CopyIntStat(PORTAL_BITMASK_INT, &portalDefaults->m_Qualities);
weenie->CopyStringStat(QUEST_RESTRICTION_STRING, &portalDefaults->m_Qualities);
}
else
weenie->CopyPositionStat(DESTINATION_POSITION, &portalDefaults->m_Qualities);
weenie->CopyIntStat(MIN_LEVEL_INT, &portalDefaults->m_Qualities);
weenie->CopyIntStat(MAX_LEVEL_INT, &portalDefaults->m_Qualities);
weenie->CopyIntStat(PORTAL_BITMASK_INT, &portalDefaults->m_Qualities);
weenie->CopyStringStat(QUEST_RESTRICTION_STRING, &portalDefaults->m_Qualities);
if (canFlagForQuest)
weenie->CopyStringStat(QUEST_STRING, &portalDefaults->m_Qualities);
}
else
{
switch (meta->_link)
{
switch (meta->_link)
{
case 1:
weenie->m_Qualities.SetPosition(DESTINATION_POSITION, m_pWeenie->InqPositionQuality(LINKED_PORTAL_ONE_POSITION, Position()));
break;
case 1:
weenie->m_Qualities.SetPosition(DESTINATION_POSITION, m_pWeenie->InqPositionQuality(LINKED_PORTAL_ONE_POSITION, Position()));
break;
case 2:
weenie->m_Qualities.SetPosition(DESTINATION_POSITION, m_pWeenie->InqPositionQuality(LINKED_PORTAL_TWO_POSITION, Position()));
break;
}
case 2:
weenie->m_Qualities.SetPosition(DESTINATION_POSITION, m_pWeenie->InqPositionQuality(LINKED_PORTAL_TWO_POSITION, Position()));
break;
}
}
......
......@@ -1478,8 +1478,7 @@ bool CTreasureFactory::MutateItem(CWeenieObject *newItem, sItemCreationInfo &cre
material = g_pPortalDataEx->_treasureTableData.RollMaterialFromBaseMaterial(materialCategory, tier->tierId);
if (material != MaterialType::Undef_MaterialType)
{
if (material != Leather_MaterialType) //don't set base leather types as that breaks the automatic item names
newItem->m_Qualities.SetInt(MATERIAL_TYPE_INT, material);
newItem->m_Qualities.SetInt(MATERIAL_TYPE_INT, material);
//materialValueMultiplier = *g_pPortalDataEx->_treasureTableData._materialValueAddedPossibly.lookup(material);
int ptid = g_pPortalDataEx->_treasureTableData.RollPaletteTemplateIDFromMaterialAndColorCode(material, colorCode);
......@@ -1494,21 +1493,6 @@ bool CTreasureFactory::MutateItem(CWeenieObject *newItem, sItemCreationInfo &cre
}
}
if (material != Undef_MaterialType)
{
if (material != Leather_MaterialType) //don't set base leather types as it's not necessary and if added it breaks the automatic item names
newItem->m_Qualities.SetInt(MATERIAL_TYPE_INT, material);
int ptid = g_pPortalDataEx->_treasureTableData.RollPaletteTemplateIDFromMaterialAndColorCode(material, colorCode);
if (ptid != 0)
{
newItem->m_Qualities.SetInt(PALETTE_TEMPLATE_INT, ptid);
newItem->m_Qualities.SetFloat(SHADE_FLOAT, getRandomDouble(1.0));
newItem->m_Qualities.SetFloat(SHADE2_FLOAT, getRandomDouble(1.0));
newItem->m_Qualities.SetFloat(SHADE3_FLOAT, getRandomDouble(1.0));
newItem->m_Qualities.SetFloat(SHADE4_FLOAT, getRandomDouble(1.0));
}
}
}
int maxGemCount = _TreasureProfile->workmanshipProperties[itemWorkmanship].maxGemCount;
......