-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[3.3.5] Sunstrider guardian aren't attacking alliance player #14744
Comments
at least on official server, they are attacking you |
UPDATE `creature_template` SET `unit_flags`=4096 WHERE `entry`=15371; it will fix your issue, but normally we will never change these fields |
According to sniffs unit_flags is 512 and unit_flags2 2048 |
Ok i will query on my DB to fix this, but why not fix this on your releases? PS: my DB is brand new, erased everything yesterday |
because that query is hack (incorrect fix) |
why theese npcs have mana=2 ?? |
Many NPC there are still acting weird. For example Evensong Ranger aren't attacking me but i appear in combat and they are staring at me lol. Sun strider guardian still aren't attacking me. |
Unit_flags updated from sniffs, but the flag UNIT_FLAG_IMMUNE_TO_NPC (512) makes npcs react def, this must be fixed in the core. UPDATE `smart_scripts` SET `action_param1`=1, `comment`='Eversong Ranger - Out of Combat - Enable Combat Movement' WHERE `entryorguid`=15938 AND `source_type`=0 AND `id`=0;
UPDATE `smart_scripts` SET `action_param1`=1, `comment`='Eversong Ranger - Out of Combat - Start Attacking' WHERE `entryorguid`=15938 AND `source_type`=0 AND `id`=1;
UPDATE `creature_template` SET `AIName`='SmartAI', `unit_flags`=512, `flags_extra`=0 WHERE `entry`=15940;
DELETE FROM `smart_scripts` WHERE `entryorguid`=15940 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(15940,0,0,0,0,0,100,0,2000,3000,4000,5000,11,20811,0,0,0,0,0,2,0,0,0,0,0,0,0,'ranger selron - IC - Cast fire ball');
UPDATE `creature_template` SET `unit_flags`=512 WHERE `entry`=15371; |
I just tested @joschiwald's theory in https://github.com/TrinityCore/TrinityCore/pull/14780/files#r31157384 diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 7f00fc7..f7e32a2 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -1370,9 +1370,6 @@ bool Creature::CanStartAttack(Unit const* who, bool force) const
if (IsCivilian())
return false;
- if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC))
- return false;
-
// Do not attack non-combat pets
if (who->GetTypeId() == TYPEID_UNIT && who->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET)
return false; After making this change in my 3.3.5 source, the [Sunstrider Guardians] reacted and attacked my nightelf hunter, but stopped attacking when I switched GM ON again. @ikir83 : notice that [Ranger Selron] is neither a guard nor has got the PvP flag on, so he will never attack a player (unless attacked first). Any NPC without the PvP flag will normally not attack a player of the opposite faction, unless the player attacks the NPC first. Edit: TrinityCore rev. 43ae872 2015-05-27 15:04:05 +0200 (3.3.5 branch) (Win64, Release) |
@ikir83 : I just checked with @mik1893 and he has changed his PR to look like the suggestion above from @joschiwald, so your issue will be solved as soon as PR #14780 is merged (soon™). |
Core/Creature: UNIT_FLAG_IMMUNE_TO_NPC check only vs non-player targets
Sunstrider guardian aren't attacking alliance player
tried at sun strider isle bridge. manny npc there aren't attacking me. Instead Silvermoon guards seem ok.
for example this npc ranger sirloin aren't attacking neither
http://www.wowhead.com/npc=15940/ranger-selron
DB 335.58
rev 0148832 2015-05-21
The text was updated successfully, but these errors were encountered: