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

Comparing deliantra/server/server/apply.C (file contents):
Revision 1.8 by root, Fri Aug 25 15:21:57 2006 UTC vs.
Revision 1.9 by root, Fri Aug 25 17:11:53 2006 UTC

1/* 1/*
2 * static char *rcsid_apply_c = 2 * static char *rcsid_apply_c =
3 * "$Id: apply.C,v 1.8 2006/08/25 15:21:57 root Exp $"; 3 * "$Id: apply.C,v 1.9 2006/08/25 17:11:53 root Exp $";
4 */ 4 */
5/* 5/*
6 CrossFire, A Multiplayer game for X-windows 6 CrossFire, A Multiplayer game for X-windows
7 7
8 Copyright (C) 2001 Mark Wedel & Crossfire Development Team 8 Copyright (C) 2001 Mark Wedel & Crossfire Development Team
1824 else 1824 else
1825 new_draw_info(NDI_UNIQUE, 0,op,"This book is totally beyond your comprehension."); 1825 new_draw_info(NDI_UNIQUE, 0,op,"This book is totally beyond your comprehension.");
1826 return; 1826 return;
1827 } 1827 }
1828 1828
1829
1830 /* Lauwenmark: Handle for plugin book event */
1831 /*printf("Book apply: %s\n", tmp->name);
1832 execute_event(tmp, EVENT_APPLY,op,NULL,SCRIPT_FIX_ALL);
1833 printf("Book applied: %s\n", tmp->name);*/
1834 /*if ((evt = find_event(tmp, EVENT_APPLY)) != NULL)
1835 {
1836 CFParm CFP;
1837 int k, l, m;
1838 uint32 n;
1839 new_draw_info_format (NDI_UNIQUE, 0, op,
1840 "You open the %s and start reading.", tmp->name);
1841 k = EVENT_APPLY;
1842 l = SCRIPT_FIX_ALL;
1843 m = 0;
1844 n = 0;
1845 CFP.Value[0] = &k;
1846 CFP.Value[1] = op;
1847 CFP.Value[2] = tmp;
1848 CFP.Value[3] = NULL;
1849 CFP.Value[4] = NULL;
1850 CFP.Value[5] = &n;
1851 CFP.Value[6] = &m;
1852 CFP.Value[7] = &m;
1853 CFP.Value[8] = &l;
1854 CFP.Value[9] = (void*)evt->hook;
1855 CFP.Value[10]= (void*)evt->options;
1856 if (findPlugin(evt->plugin)>=0)
1857 ((PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP));
1858 }
1859 else*/{
1860 readable_message_type* msgType = get_readable_message_type(tmp); 1829 readable_message_type* msgType = get_readable_message_type(tmp);
1861 draw_ext_info_format(NDI_UNIQUE | NDI_NAVY, 0, op, 1830 draw_ext_info_format(NDI_UNIQUE | NDI_NAVY, 0, op,
1862 msgType->message_type, msgType->message_subtype, 1831 msgType->message_type, msgType->message_subtype,
1863 "You open the %s and start reading.\n%s", 1832 "You open the %s and start reading.\n%s",
1864 "%s\n%s", 1833 "%s\n%s",
1865 long_desc(tmp,op), tmp->msg); 1834 long_desc(tmp,op), tmp->msg);
1866 }
1867 1835
1868 /* gain xp from reading */ 1836 /* gain xp from reading */
1869 if(!QUERY_FLAG(tmp,FLAG_NO_SKILL_IDENT)) { /* only if not read before */ 1837 if(!QUERY_FLAG(tmp,FLAG_NO_SKILL_IDENT)) { /* only if not read before */
1870 int exp_gain=calc_skill_exp(op,tmp, skill_ob); 1838 int exp_gain=calc_skill_exp(op,tmp, skill_ob);
1871 if(!QUERY_FLAG(tmp,FLAG_IDENTIFIED)) { 1839 if(!QUERY_FLAG(tmp,FLAG_IDENTIFIED)) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines