ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/request.C
(Generate patch)

Comparing deliantra/server/socket/request.C (file contents):
Revision 1.138 by root, Thu Sep 25 04:09:57 2008 UTC vs.
Revision 1.139 by root, Thu Sep 25 22:58:13 2008 UTC

1435{ 1435{
1436 packet sl; 1436 packet sl;
1437 sl << "replyinfo skill_info\n"; 1437 sl << "replyinfo skill_info\n";
1438 1438
1439 for (int i = 1; i < NUM_SKILLS; i++) 1439 for (int i = 1; i < NUM_SKILLS; i++)
1440 sl.printf ("%d:%s\n", i + CS_STAT_SKILLINFO, &skill_names[i]); 1440 sl.printf ("%d:%s\n", i + CS_STAT_SKILLINFO, &skill_names [i]);
1441 1441
1442 if (sl.length () > MAXSOCKBUF) 1442 if (sl.length () > MAXSOCKBUF)
1443 { 1443 {
1444 LOG (llevError, "Buffer overflow in send_skill_info!\n"); 1444 LOG (llevError, "Buffer overflow in send_skill_info!\n");
1445 fatal (0); 1445 fatal (0);
1563 spell->cached_grace = SP_level_spellpoint_cost (pl->ob, spell, SPELL_GRACE); 1563 spell->cached_grace = SP_level_spellpoint_cost (pl->ob, spell, SPELL_GRACE);
1564 spell->cached_eat = spell->stats.dam + SP_level_dam_adjust (pl->ob, spell); 1564 spell->cached_eat = spell->stats.dam + SP_level_dam_adjust (pl->ob, spell);
1565 1565
1566 /* figure out which skill it uses, if it uses one */ 1566 /* figure out which skill it uses, if it uses one */
1567 if (spell->skill) 1567 if (spell->skill)
1568 { 1568 if (object *tmp = pl->find_skill (spell->skill))
1569 for (i = 1; i < NUM_SKILLS; i++)
1570 if (!strcmp (spell->skill, skill_names[i]))
1571 {
1572 skill = i + CS_STAT_SKILLINFO; 1569 skill = tmp->subtype + CS_STAT_SKILLINFO;
1573 break;
1574 }
1575 }
1576 1570
1577 // spells better have a face 1571 // spells better have a face
1578 if (!spell->face) 1572 if (!spell->face)
1579 { 1573 {
1580 LOG (llevError, "%s: spell has no face, but face is mandatory.\n", &spell->name); 1574 LOG (llevError, "%s: spell has no face, but face is mandatory.\n", &spell->name);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines