[color=yellow]3/15/2006 - grimson[/color]
Added PHYSICAL to WeatherType enum, so we can also use it represent physical damage.
Changed CChar::Damage() to handle armor and resistance effects, it also handles the repsys,
peace breaking, elemental weakness, displays the damage, creates a reaction if an attacker
is given and calls CChar::Die() if the hp drop below 1. It takes the following values:
SI16 damageValue - The amount of damage to be done.
CChar *attacker - The char that caused the damage.
bool doRepsys - Do reputation handling (criminal, murderer, karma and fame).
WeatherType damageType - The type of damage, use NONE to ignore armor/resistance, use
PHYSICAL to use normal armor, anything above is elemental damage.
SI08 hitLoc - The hit location, use 0 for the complete body or -1 to randomly
calculate the hit location.
UI08 fightSkill - The skill used to create the damage.
bool doArmorDamage - Damage the armor part that has been hit.
The JS function .damage can also take all of these values.
Changed CChar::Die() to handle the death of chars, it takes two values:
CChar *attacker - The char that caused the death.
bool doRepsys - Do reputation handling (murderer, karma and fame).
Updated the usage of CChar::Damage() in most areas to reflect the changes and removed reputation
and death handling in those areas as this is now taken care of by CChar::Damage().
Feedback is very welcome, but don't just remove instantly again.
[color=yellow]3/14/2006 - giwo (0.98-3.5h [3.6 BETA])[/color]
Fixed a combat issue allowing enemies to fight if on the exact same location but a different Z.
Modified guard handling so when guards are globally deactivated any existing guards will not teleport.
Fixed an issue causing NPC's to be invisible.
Fixed some issues causing items behind a door to be within a characters LoS.
Adjusted erroneous Z values in house.dfn (Causing outer doors to not be part of the multi).
Added a LineOfSight() check to prevent opening containers on the other side of walls.
Modified the inMulti() routine to take into account tile height.
Simplified newCarveTarget() a bit.
Fixed a possible issue when calculating multi tile heights.
Fixed an issue causing Characters to "fall" immediately after being placed on their new boat.
Further cleanups and rewrites to CMulHandler and its related structures.
Generally I try to make sure I've accomplished a decent amount before making a commit. At least a days work, but sometimes more depending on what my objectives are. However when it's something small that I don't really need to worry about debugging, then I don't mind making a quick commit, unless I already have other code changes in progress.
In this case, I had just made a commit, so my source is (briefly) concurrent with that of the CVS, figured I'd rather get this one in now than wait until whenever my next commit may be.
But yes, every fix is worth the commit, if one desires to take the time to do so.
[color=yellow]3/15/2006 - giwo (0.98-3.5i [3.6 BETA])[/color]
Fixed an issue causing pet guarding on items in a house not to function.
Fixed an issue causing boat items not to get added to the multi.
Cleaned up CPIDoubleClick::Handle() routine.
Fixed an issue allowing players to place their items in invalid locations.
Fixed a possible issue causing doors to block LoS to themselves.
Basically, what it came down to, was an invalid location for the item. At the time I thought UO allowed placing chests immediately on the other side of a door (and thus on othe same tile as the door). However it doesn't seem they do, though the client allows it. So by blocking the placement of items at invalid locations, it will fix the "issue" I came across.
Aside from that, the placement of most of those checks in DoubleClick() just didn't make sense, so I re-arranged them to ensure they would catch everything they were meant to.
[color=yellow]16th March, 2006 - Maarc[/color]
Updated playDeathSound to simplify some of the code for males/females
Updated code so that we don't use MFLAGGET/MFLAGSET - apparently we have a std::bitset class that we can use! Also makes it somewhat more readable as well. Cheers Punt for the suggestion.
Renamed __ACCOUNTSADM_BLOCK__ to CAccountBlock
Removed dead code from accounts (stuff that was just never called at all)
Removed Get/Set Word/Bit/BitRange from CBO, as it's not being used
Removed genericDWords from CBO, as they're not being used, and are largely superfluous with custom int/string tags in JS
[color=yellow]3/16/2006 - giwo (0.98-3.5j [3.6 BETA])[/color]
Fixed an issue with AdvancedPathFinding() causing NPC's to flee constantly.
Fixed an issue with NPC fleeing that checked against Strength rather than MaxHP.
Defaulted weather damage to every 60 seconds (rather than every second)
Fixed an issue causing a message to display damage taken by weather when no damage was taken.
Fixed an issue with CRace causing a race with no elemental damage types to have most/all elemental damage types.
Fixed a server crash in magic.
Fixed an issue causing items in a paperdoll to not be targetable.
Fixed an issue with LoS causing items to not block on a diagonal plane.
Fixed an issue causing multi's not to block LoS.
Minor fixes, cleanups, and optimizations to LineOfSight.
Modified DoubleClick() so a character inside a multi can open an item outside a multi (as long as he can see it).
[color=yellow]3/16/2006 - giwo (0.98-3.5j [3.6 BETA])[/color]
Fixed an issue causing a message to display damage taken by weather when no damage was taken.
doLightEffect() should display messages when no damage is taken. It displays message 1215 "The sun will rise soon!" before the light does damage and it will display message 1218 "The sun will set soon!" when the light stops doing damage.
Well, rather than either of those two messages (which I never saw) every time I logged in I was spammed with "You are scorched by the light" or something of that nature, even though I took no damage from said light.
I fixed the problem of being spammed (changing it to every minute, rather than every second by default) and the problem of races which did not have a weakness to light being weak to it (caused by a class variable that was not initialized) however classes that DO take light damage still shouldn't see a message telling them they are scorched unless they actually are taking damage.
[color=yellow]3/17/2006 - grimson[/color]
Changed CPICreateCharacter::newbieItems() so that it uses the newbie.dfn entrys [DEFAULT MALE] and
[DEFAULT FEMALE] to add the basic clothing to new chars, and added those entrys to newbie.dfn.
Changed newCarveTarget() so that it uses the new [CARVE HUMAN] entry from carve.dfn to create the
body parts, and added this entry to carve.dfn. Note: the second value used on the ADDITEM tags
in the [CARVE HUMAN] entry is not an amount, it's the dictionary entry used for naming the body
part.
Sorry, couldn't do much more today as I got too much real-life work to do.
[color=yellow]3/17/2006 - grimson[/color]
Moved defense modifications into CHandleCombat::ApplyDefenseModifiers().
Moved damage bonuses into CHandleCombat::ApplyDamageBonuses().
Moved the calculation of the hit location from CHandleCombat::DoHitMessage()
into CHandleCombat::CalculateHitLoc().
Added ReactOnDamage() to CCHar, currently it only makes the char attack the
char that inflicted the damage.
Reduced CChar::Damage() to show, the damage, apply the damage, handle the
reputation effect, the peace breaking effect and the chars death.
JS changes:
New JS functions:
damage = ApplyDamageBonuses( damageType, attacker, defender, fightSkill, hitLoc, baseDamage );
Note: Attacker and defender need to be valid chars.
damage = ApplyDefenseModifiers( damageType, attacker, defender, fightSkill, hitLoc, baseDamage, doArmorDamage );
Note: Attacker can be NULL, fightSkill will then be ignored.
New char function:
mChar.ReactOnDamage( damageType, attacker );
Note: damageType is currently unused.
Changed char function:
mChar.Damage( amount, attacker, doRepsys );