Commit Graph

52 Commits (1f2349ef6e82b7b1b82e1de6db2776e2043fb18d)

Author SHA1 Message Date
David Cernat db9c1b9882 [Client] Add MechanicsHelper::getItem() for getting mwmp::Item from Ptr 6 years ago
David Cernat d83160523f [Client] Add items required for item magic casting when they are missing 6 years ago
David Cernat e834a4ec74 [Client] Find closest enchantmentCharge in getItemPtrFromStore()
Enchanted inventory items continuously recharge their enchantment charges, which getItemPtrFromStore() should account for.

Additionally, prevent framelistener errors caused by PlayerItemUse packets about non-existent items.
6 years ago
David Cernat e402a17757 [Client] Don't cast non-weapons to weapons in isUsingRangedWeapon()
This makes lockpicks and probes work again.
6 years ago
David Cernat f100a660d4 [General] Fix ranged attack sync when using last throwing weapon or ammo 6 years ago
David Cernat 995d20348f [General] Always use correct ranged weapon & ammo for ranged attack sync
Previously, the player's currently selected weapon was being used in ranged attacks as in the original melee-oriented attack sync, which meant that shooting one type of projectile and then equipping another while the old projectile was still in the air turned the old projectile into the new projectile upon impact.

Additionally, avoid running most of the code in MechanicsHelper::assignAttackTarget() for non-hitting melee and ranged attacks.
6 years ago
David Cernat 490303dc0b [Client] Clean up MechanicsHelper::processAttack() slightly
The debug is now more descriptive and some code is now skipped for non-ranged attacks.
6 years ago
David Cernat af49f711ca [Client] Add isUsingRangedWeapon() method to MechanicsHelper 6 years ago
David Cernat 9d2cf6629b [Client] Fix logic for hand-to-hand attack sync 6 years ago
David Cernat fcd31bf4a6 [General] Fix problems with the synchronization of ranged attacks
Projectile hits now send Attack packets with RANGED attacks, and their success or failure is now synchronized.

Strike enchantments no longer require a valid victim to be synchronized.

Additional debug messages have been added for attacks.
6 years ago
David Cernat 31a9b77f34 [Client] Reset hitPosition in MechanicsHelper::resetAttack() 6 years ago
David Cernat 8012d0d7b7 [General] Include hit position in PlayerAttack and ActorAttack packets 6 years ago
David Cernat 338efdb705 [General] Fix issues with MechanicsHelper::getItemPtrFromStore() 6 years ago
David Cernat 8df08c7d10 [General] Implement PlayerItemUse packet
Players can no longer unilaterally use items on themselves in their inventory. When they try to use an item, they send a PlayerItemUse packet to the server with the item's details. A serverside script can then check the item and either send the packet back to make the item use go through or drop it.
6 years ago
David Cernat 36ac2d9de4 [Client] Set packetOrigin for all ObjectList packets sent 7 years ago
David Cernat 20e0100706 [General] Rework Attack packets and add synchronization for item magic 7 years ago
David Cernat b6324e3532 [Client] Clean up debug for spell usage 7 years ago
David Cernat 09da24f1ea [General] Rename all instances of refNumIndex into refNum
This creates symmetry with mpNum and should cause less confusion in the future.
7 years ago
David Cernat 509882b5f6 [Client] Rework MechanicsHelper::getTarget() to avoid crashes 7 years ago
David Cernat 4eb72eecb1 [Client] Fix crash for invalid CellRefs in MechanicsHelper::getTarget() 7 years ago
David Cernat f02492a593 [General] Temporarily include target names in mwmp::Target
These will be removed once the server can get the names matching refIds by reading content files.
7 years ago
David Cernat 130a32ebb0 [Client] Add new methods for handling mwmp::Target in MechanicsHelper 7 years ago
David Cernat 78234f9071 [General] Rename Event into ObjectList & WorldObject into BaseObject 7 years ago
David Cernat 34be9383e5 [General] Add isPlayer boolean to targets in packets 7 years ago
David Cernat a86c68c5a1 [General] Add sync for ranged weapon & projectile strike enchantments 7 years ago
David Cernat 3f8d94b030 [General] Synchronize strike enchantments in combat 7 years ago
David Cernat d19d8b0a34 [Client] Add and use enchantmentType argument for unequipItemsByEffect() 7 years ago
David Cernat c6a85ee8f9 [Client] Add doesEffectListContainEffect() method to MechanicsHelper 7 years ago
David Cernat aa392ebf20 [Client] Unequip items if necessary when attr/skill modifier is set to 0 7 years ago
David Cernat 4db64e1721 [Client] Synchronize spellcasting for non-bipedal creatures 8 years ago
Koncord 5b2cab4c6b [General] Change NULL to nullptr 8 years ago
Koncord 0ed0d2417b [Client] Make foreach style consistent with other 8 years ago
Koncord 6222c20e82 [Client] Convert MechanicsHelper to namespace 8 years ago
David Cernat e5f5b047bc [Client] Don't send empty ObjectSpawn packets for cells with no leveled creatures 8 years ago
David Cernat f4cdedd8cb [General] Synchronize summoned creatures 8 years ago
David Cernat 4e5c8873e0 [General] Use ObjectSpawn instead of ObjectPlace for actors 8 years ago
David Cernat 7177d56cfb [Client] Only require refNumIndex & mpNum for CellStore::searchExact() 8 years ago
David Cernat 7c87ac80ee [Client] Ensure correct drawState when receiving an ActorAttack packet 8 years ago
David Cernat dcc61a095a [Client] Allow multiple WorldObjects to be added to a WorldEvent 8 years ago
David Cernat bdc8b7f863 [Client] Send level creatures in ObjectPlace reply to ActorList request 8 years ago
David Cernat 809b4d78ba [Client] Split off DedicatedPlayer and PlayerList into different files 8 years ago
David Cernat ea7c3f2dc7 [Client] Make tes3mp combat code work with Creatures, not just NPCs 8 years ago
David Cernat 2e8714afaa [Client] Rethink and restructure tes3mp combat code so it works for NPCs 8 years ago
David Cernat 6c2bbd6608 [Client] Fix assignAttackTarget() not assigning LocalPlayer as target 8 years ago
David Cernat 0ef9e014eb [Client] Add resetAttack() and getSpellSuccess() to MechanicsHelper 8 years ago
David Cernat c3375ba86f [Client] Add MechanicsHelper::assignAttackTarget() 8 years ago
David Cernat 17c4b6d4de [Client] Add MechanicsHelper methods for easily getting Attacks from Ptr 8 years ago
David Cernat 0aaf68c994 [Client] Rename mwmp::Players into mwmp::PlayerList for clarity 8 years ago
David Cernat a650683bae [General] Add and use Target struct in mwmp::Attack 8 years ago
David Cernat caf5428532 [General] Rename mwmp::Attack vars in preparation for Actor support 8 years ago