Charm spells

A place where you can talk about anything Dawn of Light or DAOC related

Moderators: Project Admin, Support Team

Charm spells

Postby Tralon » Tue Jan 28, 2014 2:32 pm

I have a charm problem on my server. it tells me
Code: Select all
it cant charm this type of monster
. Someone know what I need to do ?


Dean
(x)====|X|xxxxxxxxxxxxxxxxxxxxxxx>
Tralon
DOL Experienced
 
Posts: 176
Joined: Tue Jan 29, 2013 2:52 pm

Re: Charm spells

Postby Tolakram » Tue Jan 28, 2014 3:37 pm

Mob body types (I think it's bodytype) needs to be set correctly for spells that require certain types. It used to be setting this to 0 would allow the player to charm anything without capital letters in the name. Anyway, something along those lines.

Here is a related commit I found using the search box at the top right of this page.

http://www.dolserver.net/viewtopic.php? ... pe#p149269
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: Charm spells

Postby Tralon » Tue Jan 28, 2014 4:06 pm

thank you a lot tola :D
(x)====|X|xxxxxxxxxxxxxxxxxxxxxxx>
Tralon
DOL Experienced
 
Posts: 176
Joined: Tue Jan 29, 2013 2:52 pm

Re: Charm spells

Postby Leodagan » Wed Jan 29, 2014 6:33 am

The Charm Spell "Type" use the "AmnesiaChance" Field
Code: Select all
public enum eCharmType : ushort { All = 0, Humanoid = 1, Animal = 2, Insect = 3, HumanoidAnimal = 4, HumanoidAnimalInsect = 5, HumanoidAnimalInsectMagical = 6, HumanoidAnimalInsectMagicalUndead = 7, Reptile = 8, }
0 in AmnesiaChance allow the spell to Charm any "BodyType" Mob.

BUT there is a check to Mob BodyType before the AmnesiaChance Check, so ANY mob with BodyType = 0 can't be charmed (it's the "safety" BodyType)

And about named check there should be a property :

ServerProperties.Properties.SPELL_CHARM_NAMED_CHECK

Actually there are no options to enforce the Charm spell to work on BodyType 0 (but BodyType is a useless field for mob EXCEPT for charm, so you can always run something like : UPDATE Mob/NPCT SET BodyType = 255 WHERE BodyType = 0...)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Charm spells

Postby Tralon » Wed Feb 05, 2014 2:09 pm

how i can replace it :? @tola http://sourceforge.net/p/dolserver/code/3239/#diff-1 is this already implemented ?
(x)====|X|xxxxxxxxxxxxxxxxxxxxxxx>
Tralon
DOL Experienced
 
Posts: 176
Joined: Tue Jan 29, 2013 2:52 pm

Re: Charm spells

Postby Leodagan » Thu Feb 06, 2014 6:17 am

This is in the trunk version of DOL.

You should find the ServerProperty for named check into your database table.

But that won't change the fact that Mob with BodyType "0" won't be charmed even by Charm Spell with AmnesiaChance "0"

There is a specific check of BodyType "0" (in the IF statement before the checks for Named...), before the check against AmnesiaChance...
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Charm spells

Postby Tralon » Wed Feb 19, 2014 6:35 pm

ok like u said mobs over bodytype>0 are charmable is there a command that all mobs in one region can be get mob bodytype 1 or something ?
(x)====|X|xxxxxxxxxxxxxxxxxxxxxxx>
Tralon
DOL Experienced
 
Posts: 176
Joined: Tue Jan 29, 2013 2:52 pm

Re: Charm spells

Postby Tralon » Wed Feb 19, 2014 6:40 pm

ok nvm
(x)====|X|xxxxxxxxxxxxxxxxxxxxxxx>
Tralon
DOL Experienced
 
Posts: 176
Joined: Tue Jan 29, 2013 2:52 pm

Re: Charm spells

Postby Leodagan » Thu Feb 20, 2014 6:11 am

to give a short answer in SQL :
Code: Select all
UPDATE mob, npctemplate SET mob.BodyType = 1, npctemplate.BodyType = 1 WHERE mob.NPCTemplateID = npctemplate.TemplateID AND (mob.BodyType = 0 OR npctemplate.BodyType = 0) AND mob.Region = {RegionWanted}; UPDATE mob SET mob.BodyType = 1 WHERE mob.BodyType = 0 AND mob.Region = {RegionWanted};
This will try to update all Mob or NPCTemplate records where BodyType is set to 0, be aware it could overwrite some BodyType in mob/NpcTemplate without checking for an existing replacing values NPCT.
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Charm spells

Postby Tralon » Thu Feb 20, 2014 5:39 pm

ok thx
(x)====|X|xxxxxxxxxxxxxxxxxxxxxxx>
Tralon
DOL Experienced
 
Posts: 176
Joined: Tue Jan 29, 2013 2:52 pm


Return to “%s” General

Who is online

Users browsing this forum: No registered users and 1 guest